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

Added a UIProvider that displays a combobox on the left and a map widget in the helper container. flys-client/trunk@2544 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 24 Aug 2011 08:36:51 +0000
parents 407de0f4b66a
children 4af1ee86b0b1
comparison
equal deleted inserted replaced
832:303a923d232b 833:dcecdd9693a8
2 2
3 import org.gwtopenmaps.openlayers.client.Bounds; 3 import org.gwtopenmaps.openlayers.client.Bounds;
4 import org.gwtopenmaps.openlayers.client.Map; 4 import org.gwtopenmaps.openlayers.client.Map;
5 import org.gwtopenmaps.openlayers.client.MapOptions; 5 import org.gwtopenmaps.openlayers.client.MapOptions;
6 import org.gwtopenmaps.openlayers.client.MapWidget; 6 import org.gwtopenmaps.openlayers.client.MapWidget;
7 import org.gwtopenmaps.openlayers.client.feature.VectorFeature;
8 import org.gwtopenmaps.openlayers.client.format.GeoJSON;
7 import org.gwtopenmaps.openlayers.client.layer.Vector; 9 import org.gwtopenmaps.openlayers.client.layer.Vector;
8 import org.gwtopenmaps.openlayers.client.layer.VectorOptions; 10 import org.gwtopenmaps.openlayers.client.layer.VectorOptions;
9 import org.gwtopenmaps.openlayers.client.util.JObjectArray; 11 import org.gwtopenmaps.openlayers.client.util.JObjectArray;
10 import org.gwtopenmaps.openlayers.client.util.JSObject; 12 import org.gwtopenmaps.openlayers.client.util.JSObject;
11 13
68 70
69 return barrierLayer; 71 return barrierLayer;
70 } 72 }
71 73
72 74
75 public String getFeaturesAsGeoJSON() {
76 VectorFeature[] features = barrierLayer.getFeatures();
77
78 if (features == null || features.length == 0) {
79 return null;
80 }
81
82 return new GeoJSON().write(features);
83 }
84
85
73 public void setSize(String width, String height) { 86 public void setSize(String width, String height) {
74 mapWidget.setWidth(width); 87 mapWidget.setWidth(width);
75 mapWidget.setHeight(height); 88 mapWidget.setHeight(height);
76 } 89 }
77 } 90 }

http://dive4elements.wald.intevation.org