The DrawFeature control draws point, line or polygon features on a vector layer when active.
OpenLayers.
|
The DrawFeature control draws point, line or polygon features on a vector layer when active. |
Properties | |
events | {OpenLayers.Events} Events instance for listeners and triggering control specific events. |
multi | {Boolean} Cast features to multi-part geometries before passing to the layer. |
featureAdded | {Function} Called after each feature is added |
handlerOptions | {Object} Used to set non-default properties on the control’s handler |
Constructor | |
OpenLayers.
|
|
Functions | |
insertXY | Insert a point in the current sketch given x & y coordinates. |
insertDeltaXY | Insert a point given offsets from the previously inserted point. |
insertDirectionLength | Insert a point in the current sketch given a direction and a length. |
insertDeflectionLength | Insert a point in the current sketch given a deflection and a length. |
undo | Remove the most recently added point in the current sketch geometry. |
redo | Reinsert the most recently removed point resulting from an undo call. |
finishSketch | Finishes the sketch without including the currently drawn point. |
cancel | Cancel the current sketch. |
{OpenLayers.Events} Events instance for listeners and triggering control specific events.
control.events.register(type, obj, listener);
featureadded | Triggered when a feature is added |
layer | {OpenLayers.Layer.Vector} |
handler | {OpenLayers.Handler} |
options | {Object} |
insertDeflectionLength: function( deflection, length )
Insert a point in the current sketch given a deflection and a length. The deflection should be degrees clockwise from the previously digitized segment.
deflection | {Number} Degrees clockwise from the previous segment. |
length | {Number} Distance from the previously drawn point. |
redo: function()
Reinsert the most recently removed point resulting from an undo call. The undo stack is deleted whenever a point is added by other means.
{Boolean} An edit was redone.
Insert a point in the current sketch given x & y coordinates.
insertXY: function( x, y )
Insert a point given offsets from the previously inserted point.
insertDeltaXY: function( dx, dy )
Insert a point in the current sketch given a direction and a length.
insertDirectionLength: function( direction, length )
Insert a point in the current sketch given a deflection and a length.
insertDeflectionLength: function( deflection, length )
Remove the most recently added point in the current sketch geometry.
undo: function()
Reinsert the most recently removed point resulting from an undo call.
redo: function()
Finishes the sketch without including the currently drawn point.
finishSketch: function()
Cancel the current sketch.
cancel: function()