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
events{<OpenLayers.Events>} Events instance for listeners and triggering control specific events.
featureDelkeyMode{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.
escapeCode{Integer} Keycode for cancel a vertex drag.

Properties

events

{<OpenLayers.Events>} Events instance for listeners and triggering control specific events.

Supported event types (in addition of <OpenLayers.Control.events>)

beforefeaturedeletedTriggered before a feature is deleted.  Listeners will receive an object with a feature property referencing the feature to be deleted, to stop delete listener should return false.
featuredeletedTriggerd after a feature is deleted.  The event object passed to listeners will have a feature property with a reference to the deleted feature, if deferDelete is true and the state of the feature is not INSERT, the estate is set as DELETE but still retains in the layer, otherwise layer is null and the feature will be destroyed after this enent.

featureDelkeyMode

{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) If the cursor is outside the map the feature are not deleted.  Default is “always”.

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.

escapeCode

{Integer} Keycode for cancel a vertex drag.  Set to null to disable cancel vertex drad by keypress.  Default is 27.

{Boolean} Instead of removing features from the layer, set feature states of deleted features to DELETE.
Close