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.
| OpenLayers. | Control to modify features. | 
| Properties | |
| documentDrag | {Boolean} If set to true, dragging vertices will continue even if the mouse cursor leaves the map viewport. | 
| geometryTypes | {Array(String)} To restrict modification to a limited set of geometry types, send a list of strings corresponding to the geometry class names. | 
| clickout | {Boolean} Unselect features when clicking outside any feature. | 
| toggle | {Boolean} Unselect a selected feature on click. | 
| standalone | {Boolean} Set to true to create a control without SelectFeature capabilities. | 
| layer | {OpenLayers.Layer.Vector} | 
| feature | {OpenLayers.Feature.Vector} Feature currently available for modification. | 
| vertex | {OpenLayers.Feature.Vector} Vertex currently being modified. | 
| vertices | {Array(OpenLayers.Feature.Vector)} Verticies currently available for dragging. | 
| virtualVertices | {Array(OpenLayers.Feature.Vector)} Virtual vertices in the middle of each edge. | 
| handlers | {Object} | 
| deleteCodes | {Array(Integer)} Keycodes for deleting verticies. | 
| virtualStyle | {Object} A symbolizer to be used for virtual vertices. | 
| vertexRenderIntent | {String} The renderIntent to use for vertices. | 
| mode | {Integer} Bitfields specifying the modification mode. | 
| createVertices | {Boolean} Create new vertices by dragging the virtual vertices in the middle of each edge. | 
| modified | {Boolean} The currently selected feature has been modified. | 
| radiusHandle | {OpenLayers.Feature.Vector} A handle for rotating/resizing a feature. | 
| dragHandle | {OpenLayers.Feature.Vector} A handle for dragging a feature. | 
| onModificationStart | {Function} Deprecated. | 
| onModification | {Function} Deprecated. | 
| onModificationEnd | {Function} Deprecated. | 
| Constructor | |
| OpenLayers. | Create a new modify feature control. | 
| Functions | |
| destroy | Take care of things that are not handled in superclass. | 
| activate | Activate the control. | 
| deactivate | Deactivate the control. | 
| beforeSelectFeature | Called before a feature is selected. | 
| selectFeature | Select a feature for modification in standalone mode. | 
| unselectFeature | Called when the select feature control unselects a feature. | 
| dragStart | Called by the drag handler before a feature is dragged. | 
| dragVertex | Called by the drag handler with each drag move of a vertex. | 
| dragComplete | Called by the drag handler when the feature dragging is complete. | 
| setFeatureState | Called when the feature is modified. | 
| resetVertices | |
| handleKeypress | Called by the feature handler on keypress. | 
| collectVertices | Collect the vertices from the modifiable feature’s geometry and push them on to the control’s vertices array. | 
| collectDragHandle | Collect the drag handle for the selected geometry. | 
| collectRadiusHandle | Collect the radius handle for the selected geometry. | 
| setMap | Set the map property for the control and all handlers. | 
| handleMapEvents | |
| moveLayerToTop | Moves the layer for this handler to the top, so mouse events can reach it. | 
| moveLayerBack | Moves the layer back to the position determined by the map’s layers array. | 
| Constants | |
| RESHAPE | {Integer} Constant used to make the control work in reshape mode | 
| RESIZE | {Integer} Constant used to make the control work in resize mode | 
| ROTATE | {Integer} Constant used to make the control work in rotate mode | 
| DRAG | {Integer} Constant used to make the control work in drag mode | 
{Boolean} Set to true to create a control without SelectFeature capabilities. Default is false. If standalone is true, to modify a feature, call the selectFeature method with the target feature. Note that you must call the unselectFeature method to finish feature modification in standalone mode (before starting to modify another feature).
{OpenLayers.Feature.Vector} Feature currently available for modification.
{OpenLayers.Feature.Vector} Vertex currently being modified.
{Array(OpenLayers.Feature.Vector)} Verticies currently available for dragging.
{Array(OpenLayers.Feature.Vector)} Virtual vertices in the middle of each edge.
{String} The renderIntent to use for vertices. If no virtualStyle is provided, this renderIntent will also be used for virtual vertices, with a fillOpacity and strokeOpacity of 0.3. Default is null, which means that the layer’s default style will be used for vertices.
{Integer} Bitfields specifying the modification mode. Defaults to OpenLayers.Control.ModifyFeature.RESHAPE. To set the mode to a combination of options, use the | operator. For example, to allow the control to both resize and rotate features, use the following syntax
control.mode = OpenLayers.Control.ModifyFeature.RESIZE |
               OpenLayers.Control.ModifyFeature.ROTATE;{OpenLayers.Feature.Vector} A handle for rotating/resizing a feature.
{OpenLayers.Feature.Vector} A handle for dragging a feature.
{Function} Deprecated. Register for “beforefeaturemodified” instead. The “beforefeaturemodified” event is triggered on the layer before any modification begins.
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.
{Function} Deprecated. Register for “afterfeaturemodified” instead. The “afterfeaturemodified” event is triggered on the layer after a feature has been modified.
Optional function to be called when a feature is finished being modified. The function should expect to be called with a feature.
Create a new modify feature control.
| layer | {OpenLayers.Layer.Vector} Layer that contains features that will be modified. | 
| options | {Object} Optional object whose properties will be set on the control. | 
beforeSelectFeature: function( feature ) 
Called before a feature is selected.
| feature | {OpenLayers.Feature.Vector} The feature about to be selected. | 
selectFeature: function( feature ) 
Select a feature for modification in standalone mode. In non-standalone mode, this method is called when a feature is selected by clicking. Register a listener to the beforefeaturemodified event and return false to prevent feature modification.
| feature | {OpenLayers.Feature.Vector} the selected feature. | 
unselectFeature: function( feature ) 
Called when the select feature control unselects a feature.
| feature | {OpenLayers.Feature.Vector} The unselected feature. | 
dragStart: function( feature ) 
Called by the drag handler before a feature is dragged. This method is used to differentiate between points and vertices of higher order geometries.
| feature | {OpenLayers.Feature.Vector} The point or vertex about to be dragged. | 
dragVertex: function( vertex, pixel ) 
Called by the drag handler with each drag move of a vertex.
| vertex | {OpenLayers.Feature.Vector} The vertex being dragged. | 
| pixel | {OpenLayers.Pixel} Pixel location of the mouse event. | 
dragComplete: function( vertex ) 
Called by the drag handler when the feature dragging is complete.
| vertex | {OpenLayers.Feature.Vector} The vertex being dragged. | 
setMap: function( map ) 
Set the map property for the control and all handlers.
| map | {OpenLayers.Map} The control’s map. | 
Take care of things that are not handled in superclass.
destroy: function() 
Activate the control.
activate: function() 
Deactivate the control.
deactivate: function() 
Called before a feature is selected.
beforeSelectFeature: function( feature ) 
Select a feature for modification in standalone mode.
selectFeature: function( feature ) 
Called when the select feature control unselects a feature.
unselectFeature: function( feature ) 
Called by the drag handler before a feature is dragged.
dragStart: function( feature ) 
Called by the drag handler with each drag move of a vertex.
dragVertex: function( vertex, pixel ) 
Called by the drag handler when the feature dragging is complete.
dragComplete: function( vertex ) 
Called when the feature is modified.
setFeatureState: function() 
resetVertices: function() 
Called by the feature handler on keypress.
handleKeypress: function( evt ) 
Collect the vertices from the modifiable feature’s geometry and push them on to the control’s vertices array.
collectVertices: function() 
Collect the drag handle for the selected geometry.
collectDragHandle: function() 
Collect the radius handle for the selected geometry.
collectRadiusHandle: function() 
Set the map property for the control and all handlers.
setMap: function( map ) 
handleMapEvents: function( evt ) 
Moves the layer for this handler to the top, so mouse events can reach it.
moveLayerToTop: function() 
Moves the layer back to the position determined by the map’s layers array.
moveLayerBack: function()