// $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;
* @version 1.0
*/
public class FeatureDistributionDetailElement extends AbstractCdmDetailElement<FeatureNodeContainer> {
-
+
private BrowserElement image;
-
+
/**
* <p>Constructor for FeatureDistributionDetailElement.</p>
*
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);
} 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));
/** {@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
*/