OpenLayers. Control. ModifyFeature

Control to modify features.  When activated, a click renders the vertices of a feature - these vertices can then be dragged.  By default, the delete key will delete the vertex under the mouse.  New features are added by dragging “virtual vertices” between vertices.  Create a new control with the OpenLayers.Control.ModifyFeature constructor.

Inherits From

Summary
Control to modify features.
{Array(String)} To restrict modification to a limited set of geometry types, send a list of strings corresponding to the geometry class names.
{Array(Integer)} Keycodes for deleting verticies.
{<OpenLayers.Feature.Vector.Style>}
{Function} Optional function to be called when a feature is selected to be modified.
{Function} Optional function to be called when a feature has been modified.
{Function} Optional function to be called when a feature is finished being modified.
Create a new modify feature control.
Take care of things that are not handled in superclass.
Activate the control and the feature handler.
Deactivate the controls.

Properties

geometryTypes

{Array(String)} To restrict modification to a limited set of geometry types, send a list of strings corresponding to the geometry class names.

deleteCodes

{Array(Integer)} Keycodes for deleting verticies.  Set to null to disable vertex deltion by keypress.  If non-null, keypresses with codes in this array will delete vertices under the mouse.  Default is 46 and 100, the ‘delete’ and lowercase ‘d’ keys.

virtualStyle

{<OpenLayers.Feature.Vector.Style>}

onModificationStart

{Function} Optional function to be called when a feature is selected to be modified.  The function should expect to be called with a feature.  This could be used for example to allow to lock the feature on server-side.

onModification

{Function} Optional function to be called when a feature has been modified.  The function should expect to be called with a feature.

onModificationEnd

{Function} Optional function to be called when a feature is finished being modified.  The function should expect to be called with a feature.

Constructor

OpenLayers. Control. ModifyFeature

Create a new modify feature control.

Parameters

layer{OpenLayers.Layer.Vector} Layer that contains features that will be modified.
options{Object} Optional object whose properties will be set on the control.

Functions

destroy

destroy: function()

Take care of things that are not handled in superclass.

activate

activate: function()

Activate the control and the feature handler.

Returns

{Boolean} Successfully activated the control and feature handler.

deactivate

deactivate: function()

Deactivate the controls.

Returns

{Boolean} Successfully deactivated the control.

destroy: function()
Take care of things that are not handled in superclass.
activate: function()
Activate the control and the feature handler.
deactivate: function()
Deactivate the controls.
Create a new modify feature control.
Controls affect the display or behavior of the map.
Instances of OpenLayers.Layer.Vector are used to render vector data from a variety of sources.