X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/blobdiff_plain/2ffc9bc78123041a1be8c396552db687b296e438..cf3d9f7610096dee6e4e78013ac42090047f481f:/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/feature/FeatureDistributionDetailElement.java diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/feature/FeatureDistributionDetailElement.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/feature/FeatureDistributionDetailElement.java index 6c2bd5bbd..f9b176e72 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/feature/FeatureDistributionDetailElement.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/feature/FeatureDistributionDetailElement.java @@ -1,16 +1,14 @@ -// $Id$ /** * Copyright (C) 2007 EDIT -* European Distributed Institute of Taxonomy +* European Distributed Institute of Taxonomy * http://www.e-taxonomy.eu -* +* * The contents of this file are subject to the Mozilla Public License Version 1.1 * See LICENSE.TXT at the top of this package for the full license terms. */ package eu.etaxonomy.taxeditor.ui.section.feature; -import java.awt.Color; import java.net.URI; import java.net.URISyntaxException; import java.util.Arrays; @@ -20,9 +18,12 @@ import java.util.Map; import org.eclipse.swt.SWT; import org.eclipse.swt.widgets.Label; +import eu.etaxonomy.cdm.api.application.CdmApplicationRemoteController; import eu.etaxonomy.cdm.common.UriUtils; +import eu.etaxonomy.cdm.ext.geo.IEditGeoService; import eu.etaxonomy.cdm.model.common.Language; -import eu.etaxonomy.cdm.model.description.PresenceAbsenceTermBase; +import eu.etaxonomy.cdm.model.description.DescriptionElementBase; +import eu.etaxonomy.cdm.model.description.PresenceAbsenceTerm; import eu.etaxonomy.cdm.model.description.TaxonDescription; import eu.etaxonomy.taxeditor.model.FeatureNodeContainer; import eu.etaxonomy.taxeditor.preference.IPreferenceKeys; @@ -42,9 +43,9 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement; * @version 1.0 */ public class FeatureDistributionDetailElement extends AbstractCdmDetailElement { - + private BrowserElement image; - + /** *

Constructor for FeatureDistributionDetailElement.

* @@ -64,16 +65,21 @@ public class FeatureDistributionDetailElement extends AbstractCdmDetailElement, java.awt.Color> presenceAbsenceTermColors = null; + Map presenceAbsenceTermColors = null; // FIXME due to a bug in the rest map service we have to ensure that width will always be an even number - // image.calculateWidth() % 2 == 1 ? image.calculateWidth() + 1 : + // image.calculateWidth() % 2 == 1 ? image.calculateWidth() + 1 : int width = image.calculateWidth(); - - String bbox = "-180,-90,180,90"; - String backLayer = null; - + IEditGeoService editGeoService; List languages = Arrays.asList(new Language[]{CdmStore.getDefaultLanguage()}); - - String parameter = CdmStore.getGeoService().getDistributionServiceRequestParameterString(getTaxonDescriptions(), - false, false, null, presenceAbsenceTermColors, width, 0, bbox, backLayer, languages); - - String mapUriString = String.format("%s?%s&ms=1000", accessPoint, parameter); + editGeoService = ((CdmApplicationRemoteController)CdmStore.getCurrentApplicationConfiguration()).getEditGeoService(); + + String parameter = editGeoService.getDistributionServiceRequestParameterString( + getTaxonDescriptions(), + false, + false, + null, + presenceAbsenceTermColors, + languages); + + String mapUriString = String.format("%s?%s&ms=1000&bbox=-180,-90,180,90&l=earth", accessPoint, parameter); return mapUriString; } - + /** * @return */ @@ -127,4 +136,13 @@ public class FeatureDistributionDetailElement extends AbstractCdmDetailElement