diff flys-client/src/main/java/de/intevation/flys/client/client/ui/map/DrawControl.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 981dde77b49f
children 8af500d62098
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/DrawControl.java	Wed Oct 12 12:42:53 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/map/DrawControl.java	Thu Oct 13 09:08:43 2011 +0000
@@ -16,6 +16,7 @@
 import com.smartgwt.client.widgets.layout.HLayout;
 
 import org.gwtopenmaps.openlayers.client.Map;
+import org.gwtopenmaps.openlayers.client.Style;
 import org.gwtopenmaps.openlayers.client.control.Control;
 import org.gwtopenmaps.openlayers.client.control.DrawFeature;
 import org.gwtopenmaps.openlayers.client.event.VectorFeatureAddedListener;
@@ -155,7 +156,10 @@
         if (type == null || type.length() == 0) {
             type = getSelectedType();
 
-            feature.setStyle(FloodMap.getStyle(type));
+            Style style = FloodMap.getStyle(type);
+            if (style != null) {
+                feature.setStyle(style);
+            }
 
             if (type.equals(BARRIER_PIPE1)) {
                 attrs.setAttribute("typ", BARRIER_PIPE1_VALUE);

http://dive4elements.wald.intevation.org