OpenLayers.Handler.Path

Patch for Path and Poligon handlers.

Extends `Path` & `Polygon` handlers to remove the last added point or delete the drawing if no more points to remove by esc-key.  The keys act only when the cursor is on the map.

NOTE: At the build process “requires” for Polygon.js is not strictly necessary, so if not want to use Handler.Polygon the Polygon.js file could be added in [exclude] paragraph in the *.cfg file.

Summary
OpenLayers.Handler.PathPatch for Path and Poligon handlers.
Properties
onMap{Boolean} Read only, true if the cursor is on the map.
keyboardHandler{<OpenLayers.Handler.Keyboard>}
Functions
destroy
setMap
activate
deactivate
handleKeypressCalled by the handler on keydown.
moveHandle mousemove and touchmove.
mouseoutHandle mouse out.

Properties

onMap

{Boolean} Read only, true if the cursor is on the map.

keyboardHandler

{<OpenLayers.Handler.Keyboard>}

Functions

destroy

destroy: function()

setMap

setMap: function(map)

activate

activate: function()

deactivate

deactivate: function()

handleKeypress

handleKeypress: function(evt)

Called by the handler on keydown.

Parameters

evt{Event} Keydown event.

move

move: function(evt)

Handle mousemove and touchmove.  Adjust the geometry and redraw.  Return determines whether to propagate the event on the map.

Parameters

evt{Event} The browser event

Returns

{Boolean} Allow event propagation

mouseout

mouseout: function(evt)

Handle mouse out.  For better user experience reset mouseDown and stoppedDown when the mouse leaves the map viewport.

Parameters

evt{Event} The browser event
destroy: function()
setMap: function(map)
activate: function()
deactivate: function()
handleKeypress: function(evt)
Called by the handler on keydown.
move: function(evt)
Handle mousemove and touchmove.
mouseout: function(evt)
Handle mouse out.
Close