diff flys-client/src/main/java/de/intevation/flys/client/client/ui/map/FloodMap.java @ 1315:cf0f906921de

#297 Implemented a window to adjust elevations of geometries in the map. flys-client/trunk@2954 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 13 Oct 2011 09:08:43 +0000
parents 89a47098bcbd
children 45b9b1fc26e2
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/FloodMap.java	Wed Oct 12 12:42:53 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/FloodMap.java	Thu Oct 13 09:08:43 2011 +0000
@@ -20,6 +20,8 @@
 
     public static final String LAYER_BARRIERS = "vector_layer_barriers";
 
+    public static final String MARK_SELECTED = "mark.selected";
+
     protected MapWidget mapWidget;
     protected Map       map;
     protected Vector    barrierLayer;
@@ -57,7 +59,10 @@
             return;
         }
 
-        feature.setStyle(getStyle(type));
+        Style style = getStyle(type);
+        if (style != null) {
+            feature.setStyle(style);
+        }
 
         // necessary, otherwise the setStyle() has no effect
         barrierLayer.redraw();
@@ -75,6 +80,10 @@
     public static Style getStyle(String type) {
         Style style = new Style();
 
+        if (type == null) {
+            return null;
+        }
+
         if (type.equals(DrawControl.BARRIER_PIPE1)
             || type.equals(DrawControl.BARRIER_PIPE1_VALUE)
         ) {
@@ -125,11 +134,16 @@
     }
 
 
+    public Bounds getMaxExtent() {
+        return maxExtent;
+    }
+
+
     public Vector getBarrierLayer() {
         if (barrierLayer == null) {
             VectorOptions opts = new VectorOptions();
             opts.setProjection(getRiverProjection());
-            opts.setMaxExtent(maxExtent);
+            opts.setMaxExtent(getMaxExtent());
 
             barrierLayer = new Vector(LAYER_BARRIERS, opts);
             barrierLayer.setIsBaseLayer(true);

http://dive4elements.wald.intevation.org