OpenLayers.Handler.Path – OpenLayers 2

Handler to draw a path on the map. Path is displayed on mouse down, moves on mouse move, and is finished on mouse up. {Number} The maximum number of vertices which can be drawn by this handler. When the number of vertices reaches maxVertices, the geometry is automatically finalized. Default is null. {Number} Maximum number of pixels between two touches for the gesture to be considered a “finalize feature” action. Default is 20. {Boolean} In freehand mode, the handler starts the path on mouse down, adds a point for every mouse move, and finishes the path on mouse up. Outside of freehand mode, a point is added to the path on every mouse click and double-click finishes the path. {String} If set, freehandToggle is checked on mouse events and will set the freehand mode to the opposite of this.freehand. To disallow toggling between freehand and non-freehand mode, set freehandToggle to null. Acceptable toggle values are ‘shiftKey’, ‘ctrlKey’, and ‘altKey’. Add point to geometry. Send the point index to override the behavior of LinearRing that disregards adding duplicate points. Insert a point in the current sketch given x & y coordinates. The new point is inserted immediately before the most recently drawn point. Insert a point in the current sketch given a deflection and a length. The deflection should be degrees clockwise from the previously digitized segment. Reinsert the most recently removed point resulting from an undo call. The undo stack is deleted whenever a point is added by other means. Handle mousedown and touchstart. Add a new point to the geometry and render it. Return determines whether to propagate the event on the map. Handle mousemove and touchmove. Adjust the geometry and redraw. Return determines whether to propagate the event on the map. Handle mouseup and touchend. Send the latest point in the geometry to the control. Return determines whether to propagate the event on the map. Source.


Яндекс.Метрика Рейтинг@Mail.ru Free Web Counter
page counter
Last Modified: April 25, 2016 @ 6:08 pm