# HG changeset patch # User Ingo Weinzierl # Date 1321276742 0 # Node ID 3f6d2f18ee7bb9158813f86effe701fbbeff5339 # Parent b3264b5770b3c37da3f3578949919693588039bb Added a ScaleLine to the map. flys-client/trunk@3247 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r b3264b5770b3 -r 3f6d2f18ee7b flys-client/ChangeLog --- 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 + + * src/main/java/de/intevation/flys/client/client/ui/map/FloodMap.java: + Added a ScaleLine control to the map. + 2011-11-11 Ingo Weinzierl * src/main/java/de/intevation/flys/client/client/ui/map/FloodMap.java: diff -r b3264b5770b3 -r 3f6d2f18ee7b flys-client/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(); }