X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/blobdiff_plain/9ace5c9d30feca3550cded9afbf46769fc9993f4..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 186242eb0..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,4 +1,3 @@ -// $Id$ /** * Copyright (C) 2007 EDIT * European Distributed Institute of Taxonomy @@ -19,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; @@ -63,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 : int width = image.calculateWidth(); - - String bbox = "-180,-90,180,90"; - String backLayer = "earth"; - + IEditGeoService editGeoService; List languages = Arrays.asList(new Language[]{CdmStore.getDefaultLanguage()}); + editGeoService = ((CdmApplicationRemoteController)CdmStore.getCurrentApplicationConfiguration()).getEditGeoService(); - String parameter = CdmStore.getGeoService().getDistributionServiceRequestParameterString(getTaxonDescriptions(), - false, false, null, presenceAbsenceTermColors, width, 0, bbox, backLayer, languages); + String parameter = editGeoService.getDistributionServiceRequestParameterString( + getTaxonDescriptions(), + false, + false, + null, + presenceAbsenceTermColors, + languages); - String mapUriString = String.format("%s?%s&ms=1000", accessPoint, parameter); + String mapUriString = String.format("%s?%s&ms=1000&bbox=-180,-90,180,90&l=earth", accessPoint, parameter); return mapUriString; } @@ -126,4 +136,13 @@ public class FeatureDistributionDetailElement extends AbstractCdmDetailElement