added hardcoded base layer "earth" (#3941)
authorPatric Plitzner <p.plitzner@bgbm.org>
Wed, 8 Jan 2014 14:08:06 +0000 (14:08 +0000)
committerPatric Plitzner <p.plitzner@bgbm.org>
Wed, 8 Jan 2014 14:08:06 +0000 (14:08 +0000)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/feature/FeatureDistributionDetailElement.java

index 6c2bd5bbd51f83ec9b16a2b240793c2ad16651c6..186242eb0ba6b32a9e1eee9fd4dee88323257c66 100644 (file)
@@ -1,16 +1,15 @@
 // $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;
@@ -42,9 +41,9 @@ import eu.etaxonomy.taxeditor.ui.section.AbstractCdmDetailElement;
  * @version 1.0
  */
 public class FeatureDistributionDetailElement extends AbstractCdmDetailElement<FeatureNodeContainer> {
-       
+
        private BrowserElement image;
-       
+
        /**
         * <p>Constructor for FeatureDistributionDetailElement.</p>
         *
@@ -73,7 +72,7 @@ public class FeatureDistributionDetailElement extends AbstractCdmDetailElement<F
                                String mapUriString = getMapUriString(getEntity());
                                image.setImageUriString(mapUriString);
                                formElement.getLayoutComposite().layout();
-                               message = mapUriString; 
+                               message = mapUriString;
                                return;
                        } else {
                                message = String.format("The service is not available: %s", serviceUriString);
@@ -81,7 +80,7 @@ public class FeatureDistributionDetailElement extends AbstractCdmDetailElement<F
                } catch (URISyntaxException e) {
                        message = String.format("The URI has problems: %s", serviceUriString);
                }
-               
+
                Label label = formFactory.createLabel(getLayoutComposite(), message, SWT.WRAP);
                addControl(label);
                label.setLayoutData(LayoutConstants.FILL(2, 1));
@@ -94,32 +93,32 @@ public class FeatureDistributionDetailElement extends AbstractCdmDetailElement<F
        /** {@inheritDoc} */
        @Override
        public void handleEvent(Object eventSource) {
-               // 
+               //
        }
 
        /**
         * @return
-        * @throws URISyntaxException 
+        * @throws URISyntaxException
         */
        private String getMapUriString(FeatureNodeContainer container){
                String accessPoint = PreferencesUtil.getMapServiceAccessPoint();
                Map<PresenceAbsenceTermBase<?>, java.awt.Color> 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;
+
+               String bbox = "-180,-90,180,90";
+               String backLayer = "earth";
 
                List<Language> languages = Arrays.asList(new Language[]{CdmStore.getDefaultLanguage()});
-               
-               String parameter = CdmStore.getGeoService().getDistributionServiceRequestParameterString(getTaxonDescriptions(), 
+
+               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);
                return mapUriString;
        }
-       
+
        /**
         * @return
         */