if I don't use style on vector layer ,ModifyFeature control works well.
but if I use a default style.
it don't work!can only selected but cann't modify! OL2.12
var vector_line_layer = new OpenLayers.Layer.Vector(type);
var vector_line_style = new OpenLayers.Style({
strokeColor : "#00FFFF",
strokeWidth : 3,
strokeDashstyle : "longdash"
});
var vector_style_map = new OpenLayers.StyleMap({
'default' : vector_line_style
});
vector_line_layer.styleMap = vector_style_map;
map.addLayer(vector_line_layer);
lineControl = new OpenLayers.Control.DrawFeature(vector_line_layer,
OpenLayers.Handler.Path);
map.addControl(lineControl);
lineControl.activate();
modifyControl = new OpenLayers.Control.ModifyFeature(
vector_line_layer,{geometryTypes:
["OpenLayers.Geometry.LineString"]});
map.addControl(modifyControl);
modifyControl.mode=OpenLayers.Control.ModifyFeature.RESHAPE;
modifyControl.activate();
------------------
========================================================================================
OpenGSC
????OGC????????????GIS??
_______________________________________________
Users mailing list
us...@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users