comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/map/FloodMap.java @ 799:f4299b90c996

Added controls to navigate in the map. flys-client/trunk@2318 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 11 Jul 2011 13:29:57 +0000
parents cc3f481e9484
children 95cc560ce7c4
comparison
equal deleted inserted replaced
798:7061c2e66039 799:f4299b90c996
1 package de.intevation.flys.client.client.ui.map; 1 package de.intevation.flys.client.client.ui.map;
2 2
3 import org.gwtopenmaps.openlayers.client.Map; 3 import org.gwtopenmaps.openlayers.client.Map;
4 import org.gwtopenmaps.openlayers.client.MapOptions; 4 import org.gwtopenmaps.openlayers.client.MapOptions;
5 import org.gwtopenmaps.openlayers.client.MapWidget; 5 import org.gwtopenmaps.openlayers.client.MapWidget;
6 import org.gwtopenmaps.openlayers.client.control.Navigation;
7 import org.gwtopenmaps.openlayers.client.util.JObjectArray; 6 import org.gwtopenmaps.openlayers.client.util.JObjectArray;
8 import org.gwtopenmaps.openlayers.client.util.JSObject; 7 import org.gwtopenmaps.openlayers.client.util.JSObject;
9 8
10 9
11 public class FloodMap { 10 public class FloodMap {
20 opts.setNumZoomLevels(16); 19 opts.setNumZoomLevels(16);
21 opts.setProjection(getRiverProjection()); 20 opts.setProjection(getRiverProjection());
22 21
23 mapWidget = new MapWidget("510px", "635px", opts); 22 mapWidget = new MapWidget("510px", "635px", opts);
24 map = mapWidget.getMap(); 23 map = mapWidget.getMap();
25
26 initControls();
27 }
28
29
30 protected void initControls() {
31 map.addControl(new Navigation());
32 } 24 }
33 25
34 26
35 public MapWidget getMapWidget() { 27 public MapWidget getMapWidget() {
36 return mapWidget; 28 return mapWidget;
50 public void setSize(String width, String height) { 42 public void setSize(String width, String height) {
51 mapWidget.setWidth(width); 43 mapWidget.setWidth(width);
52 mapWidget.setHeight(height); 44 mapWidget.setHeight(height);
53 } 45 }
54 } 46 }
47 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org