The DragFeature control moves a feature with a drag of the mouse. Create a new control with the OpenLayers.Control.DragFeature constructor.
OpenLayers.
|
The DragFeature control moves a feature with a drag of the mouse. |
Properties | |
geometryTypes | {Array(String)} To restrict dragging to a limited set of geometry types, send a list of strings corresponding to the geometry class names. |
onStart | {Function} Define this function if you want to know when a drag starts. |
onDrag | {Function} Define this function if you want to know about each move of a feature. |
onComplete | {Function} Define this function if you want to know when a feature is done dragging. |
onEnter | {Function} Define this function if you want to know when the mouse goes over a feature and thereby makes this feature a candidate for dragging. |
onLeave | {Function} Define this function if you want to know when the mouse goes out of the feature that was dragged. |
documentDrag | {Boolean} If set to true, mouse dragging will continue even if the mouse cursor leaves the map viewport. |
Constructor | |
OpenLayers.
|
Create a new control to drag features. |
Functions | |
destroy | Take care of things that are not handled in superclass |
activate | Activate the control and the feature handler. |
deactivate | Deactivate the control and all handlers. |
{Function} Define this function if you want to know when a drag starts. The function should expect to receive two arguments: the feature that is about to be dragged and the pixel location of the mouse.
feature | {OpenLayers.Feature.Vector} The feature that is about to be dragged. |
pixel | {OpenLayers.Pixel} The pixel location of the mouse. |
{Function} Define this function if you want to know about each move of a feature. The function should expect to receive two arguments: the feature that is being dragged and the pixel location of the mouse.
feature | {OpenLayers.Feature.Vector} The feature that was dragged. |
pixel | {OpenLayers.Pixel} The pixel location of the mouse. |
{Function} Define this function if you want to know when a feature is done dragging. The function should expect to receive two arguments: the feature that is being dragged and the pixel location of the mouse.
feature | {OpenLayers.Feature.Vector} The feature that was dragged. |
pixel | {OpenLayers.Pixel} The pixel location of the mouse. |
{Function} Define this function if you want to know when the mouse goes over a feature and thereby makes this feature a candidate for dragging.
feature | {OpenLayers.Feature.Vector} The feature that is ready to be dragged. |
{Function} Define this function if you want to know when the mouse goes out of the feature that was dragged.
feature | {OpenLayers.Feature.Vector} The feature that was dragged. |
Create a new control to drag features.
layer | {OpenLayers.Layer.Vector} The layer containing features to be dragged. |
options | {Object} Optional object whose properties will be set on the control. |
Take care of things that are not handled in superclass
destroy: function()
Activate the control and the feature handler.
activate: function()
Deactivate the control and all handlers.
deactivate: function()