[OpenLayers-Users] remove selected feature
Sven Schroeter
schroeter at netgis.de
Tue Nov 18 08:07:52 PST 2014
Hi,
just switched from OL 2.12 to 2.13.
in my edit client (2.12.) I used this function to remove a single selected
feature on a vector layer:
mod_edit_layer.removeFeatures(modifyControl.feature);
now (using 2.13) I added a select Control, and the modifyControl looks like
this:
//Select Control
selectControl = new OpenLayers.Control.SelectFeature([mod_edit_layer]);
//Control Edit
modifyControl = new OpenLayers.Control.ModifyFeature(
mod_edit_layer, {
standalone: true,
displayClass : "olControlModifyFeature",
title : "Objekte bearbeiten"
});
If I try to remove a single Feature after selected it, it does not work:
mod_edit_layer.removeFeatures(modifyControl.feature);
The selected feature is removed, but some vectors keep left that are no
longer selectable.
I also tried it with destroyFeatures and refresh, but no way...
Any idea?
Sven
More information about the Users
mailing list