OpenLayers.Control.ModifyFeature

Patch for ModifyFeature control of OpenLayers.

Extends the ModifyFeature control behavior to allow delete by del-key the feature that have been selected for modification.

Summary
OpenLayers.Control.ModifyFeaturePatch for ModifyFeature control of OpenLayers.
Properties
deleteKeyMode{String} Mode in which the del-key acts to remove the feature that is selected for modification.
deferDelete{Boolean} Instead of removing features from the layer, set feature states of deleted features to DELETE.
Functions
handleKeypressCalled by the feature handler on keypress.
justUnselectFeatureCalled to unselect the feature.

Properties

deleteKeyMode

{String} Mode in which the del-key acts to remove the feature that is selected for modification.  The available modes are: “none”, “always”, “bounds” (only be deleted if when pressing del-key the mouse is within the feature bounds) and “hover” (only be deleted pressing del-key when the mouse is placed over the feature)

deferDelete

{Boolean} Instead of removing features from the layer, set feature states of deleted features to DELETE.  This assumes a save strategy or other component is in charge of removing features from the layer.  Default is false.  If false, deleted features will be immediately removed from the layer.

Functions

handleKeypress

_prototype.handleKeypress = function(evt)

Called by the feature handler on keypress.  This is used to delete vertices.  If the <deleteCode> property is set, vertices will be deleted when a feature is selected for modification and the mouse is over a vertex.

Parameters

evt{Event} Keypress event.

justUnselectFeature

_prototype.justUnselectFeature = function(feature)

Called to unselect the feature.

Parameters

feature{<OpenLayers.Feature.Vector>} The unselected feature.
_prototype.handleKeypress = function(evt)
Called by the feature handler on keypress.
_prototype.justUnselectFeature = function(feature)
Called to unselect the feature.
Close