changeset 1398:3f6d2f18ee7b

Added a ScaleLine to the map. flys-client/trunk@3247 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 14 Nov 2011 13:19:02 +0000
parents b3264b5770b3
children 748e7c828d03
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/map/FloodMap.java
diffstat 2 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Fri Nov 11 10:43:36 2011 +0000
+++ b/flys-client/ChangeLog	Mon Nov 14 13:19:02 2011 +0000
@@ -1,3 +1,8 @@
+2011-11-14  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/ui/map/FloodMap.java:
+	  Added a ScaleLine control to the map.
+
 2011-11-11  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/ui/map/FloodMap.java:
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/FloodMap.java	Fri Nov 11 10:43:36 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/FloodMap.java	Mon Nov 14 13:19:02 2011 +0000
@@ -6,6 +6,8 @@
 import org.gwtopenmaps.openlayers.client.MapOptions;
 import org.gwtopenmaps.openlayers.client.MapWidget;
 import org.gwtopenmaps.openlayers.client.Style;
+import org.gwtopenmaps.openlayers.client.control.ScaleLine;
+import org.gwtopenmaps.openlayers.client.control.ScaleLineOptions;
 import org.gwtopenmaps.openlayers.client.event.VectorFeatureAddedListener;
 import org.gwtopenmaps.openlayers.client.event.VectorFeatureAddedListener.FeatureAddedEvent;
 import org.gwtopenmaps.openlayers.client.feature.VectorFeature;
@@ -49,6 +51,14 @@
         mapWidget = new MapWidget("510px", "635px", opts);
         map       = mapWidget.getMap();
 
+        ScaleLineOptions slOpts = new ScaleLineOptions();
+        slOpts.setBottomInUnits("m");
+        slOpts.setBottomOutUnits("km");
+        slOpts.setTopInUnits("");
+        slOpts.setTopOutUnits("");
+
+        map.addControl(new ScaleLine(slOpts));
+
         getBarrierLayer();
     }
 

http://dive4elements.wald.intevation.org