[OpenLayers-Users] Delete Feature

Benoit PESTY tchule at hotmail.com
Mon Apr 7 11:36:30 EDT 2008


Hello,

I have a stupid error when trying to delete a vector feature. I've updated OpenLayers from 2.5 to 2.6 (latest from trunk) and when trying to delete a feature I have the corners of the polygon that stay on the map.

I've added a control like this :

// Delete feature
var deleteTool = new OpenLayers.Control.SelectFeature(layer_vector,
{
           onSelect:deleteFeature,
 });

And the called method is like this :
function deleteFeature(feature) {
    getEditableLayer().removeFeatures(feature);
}


The problem seems to be that when getting the vector layer (thru the getLayersByName() method) the feature is set to "modification mode".

I've tried to look around for the "renderIntent" property of the selectfeature control but I don't know the clean way to use it.

Thanks,

Benoit Pesty


_________________________________________________________________
Pack up or back up–use SkyDrive to transfer files or keep extra copies. Learn how.
hthttp://www.windowslive.com/skydrive/overview.html?ocid=TXT_TAGLM_WL_Refresh_skydrive_packup_042008
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080407/7283ed84/attachment.html


More information about the Users mailing list