Optional
options: Partial<MeasureOptions>APIMethod: cancel
Stop the control from measuring. If
APIMethod: deactivate
APIProperty: events {<OpenLayers.Events>} Events instance for listeners and triggering control specific events.
Register a listener for a particular event with the following syntax: (code) control.events.register(type, obj, listener); (end)
Supported event types (in addition to those from <OpenLayers.Control.events>):
measure - Triggered when a measurement sketch is complete. Listeners
will receive an event with measure, units, order, and geometry
properties.
measurepartial - Triggered when a new point is added to the
measurement sketch or if the
Property: map {<OpenLayers.Map>} this gets set in the addControl() function in OpenLayers.Map
APIMethod: setImmediate
Sets the
Static
TYPE_Constant: OpenLayers.Control.TYPE_BUTTON
Static
TYPE_Constant: OpenLayers.Control.TYPE_TOGGLE
Static
TYPE_Constant: OpenLayers.Control.TYPE_TOOL
APIMethod: activate Explicitly activates a control and it's associated handler if one has been set. Controls can be deactivated by calling the deactivate() method.
Returns: {Boolean} True if the control was successfully activated or false if the control was already active.
Method: destroy The destroy method is used to perform any clean up before the control is dereferenced. Typically this is where event listeners are removed to prevent memory leaks.
Method: draw The draw method is called when the control is ready to be displayed on the page. If a div has not been created one is created. Controls with a visual component will almost always want to override this method to customize the look of control.
Parameters: px - {<OpenLayers.Pixel>} The top-left pixel position of the control or null.
Returns: {DOMElement} A reference to the DIV DOMElement containing the control
Optional
px: null | PixelMethod: setMap Set the map property for the control. This is done through an accessor so that subclasses can override this and take special action once they have their map variable set.
Parameters: map - {<OpenLayers.Map>}
Constructor: OpenLayers.Control.Measure
Parameters: handler - {<OpenLayers.Handler>} options - {Object}