comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/map/FloodMap.java @ 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 c39aa5a6478c
comparison
equal deleted inserted replaced
1397:b3264b5770b3 1398:3f6d2f18ee7b
4 import org.gwtopenmaps.openlayers.client.Bounds; 4 import org.gwtopenmaps.openlayers.client.Bounds;
5 import org.gwtopenmaps.openlayers.client.Map; 5 import org.gwtopenmaps.openlayers.client.Map;
6 import org.gwtopenmaps.openlayers.client.MapOptions; 6 import org.gwtopenmaps.openlayers.client.MapOptions;
7 import org.gwtopenmaps.openlayers.client.MapWidget; 7 import org.gwtopenmaps.openlayers.client.MapWidget;
8 import org.gwtopenmaps.openlayers.client.Style; 8 import org.gwtopenmaps.openlayers.client.Style;
9 import org.gwtopenmaps.openlayers.client.control.ScaleLine;
10 import org.gwtopenmaps.openlayers.client.control.ScaleLineOptions;
9 import org.gwtopenmaps.openlayers.client.event.VectorFeatureAddedListener; 11 import org.gwtopenmaps.openlayers.client.event.VectorFeatureAddedListener;
10 import org.gwtopenmaps.openlayers.client.event.VectorFeatureAddedListener.FeatureAddedEvent; 12 import org.gwtopenmaps.openlayers.client.event.VectorFeatureAddedListener.FeatureAddedEvent;
11 import org.gwtopenmaps.openlayers.client.feature.VectorFeature; 13 import org.gwtopenmaps.openlayers.client.feature.VectorFeature;
12 import org.gwtopenmaps.openlayers.client.format.GeoJSON; 14 import org.gwtopenmaps.openlayers.client.format.GeoJSON;
13 import org.gwtopenmaps.openlayers.client.layer.Layer; 15 import org.gwtopenmaps.openlayers.client.layer.Layer;
47 opts.setMaxResolution(500); // TODO DO THIS ON THE FLY 49 opts.setMaxResolution(500); // TODO DO THIS ON THE FLY
48 50
49 mapWidget = new MapWidget("510px", "635px", opts); 51 mapWidget = new MapWidget("510px", "635px", opts);
50 map = mapWidget.getMap(); 52 map = mapWidget.getMap();
51 53
54 ScaleLineOptions slOpts = new ScaleLineOptions();
55 slOpts.setBottomInUnits("m");
56 slOpts.setBottomOutUnits("km");
57 slOpts.setTopInUnits("");
58 slOpts.setTopOutUnits("");
59
60 map.addControl(new ScaleLine(slOpts));
61
52 getBarrierLayer(); 62 getBarrierLayer();
53 } 63 }
54 64
55 65
56 @Override 66 @Override

http://dive4elements.wald.intevation.org