comparison 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
comparison
equal deleted inserted replaced
1314:4c716bec7822 1315:cf0f906921de
14 import com.smartgwt.client.widgets.form.fields.events.ChangedEvent; 14 import com.smartgwt.client.widgets.form.fields.events.ChangedEvent;
15 import com.smartgwt.client.widgets.form.fields.events.ChangedHandler; 15 import com.smartgwt.client.widgets.form.fields.events.ChangedHandler;
16 import com.smartgwt.client.widgets.layout.HLayout; 16 import com.smartgwt.client.widgets.layout.HLayout;
17 17
18 import org.gwtopenmaps.openlayers.client.Map; 18 import org.gwtopenmaps.openlayers.client.Map;
19 import org.gwtopenmaps.openlayers.client.Style;
19 import org.gwtopenmaps.openlayers.client.control.Control; 20 import org.gwtopenmaps.openlayers.client.control.Control;
20 import org.gwtopenmaps.openlayers.client.control.DrawFeature; 21 import org.gwtopenmaps.openlayers.client.control.DrawFeature;
21 import org.gwtopenmaps.openlayers.client.event.VectorFeatureAddedListener; 22 import org.gwtopenmaps.openlayers.client.event.VectorFeatureAddedListener;
22 import org.gwtopenmaps.openlayers.client.event.VectorFeatureAddedListener.FeatureAddedEvent; 23 import org.gwtopenmaps.openlayers.client.event.VectorFeatureAddedListener.FeatureAddedEvent;
23 import org.gwtopenmaps.openlayers.client.feature.VectorFeature; 24 import org.gwtopenmaps.openlayers.client.feature.VectorFeature;
153 String type = attrs.getAttributeAsString("typ"); 154 String type = attrs.getAttributeAsString("typ");
154 155
155 if (type == null || type.length() == 0) { 156 if (type == null || type.length() == 0) {
156 type = getSelectedType(); 157 type = getSelectedType();
157 158
158 feature.setStyle(FloodMap.getStyle(type)); 159 Style style = FloodMap.getStyle(type);
160 if (style != null) {
161 feature.setStyle(style);
162 }
159 163
160 if (type.equals(BARRIER_PIPE1)) { 164 if (type.equals(BARRIER_PIPE1)) {
161 attrs.setAttribute("typ", BARRIER_PIPE1_VALUE); 165 attrs.setAttribute("typ", BARRIER_PIPE1_VALUE);
162 } 166 }
163 else if (type.equals(BARRIER_PIPE2)) { 167 else if (type.equals(BARRIER_PIPE2)) {

http://dive4elements.wald.intevation.org