Allows for drawing of features for measurements.
| OpenLayers. Control. Measure | Allows for drawing of features for measurements. |
| Constants | |
| EVENT_TYPES | {Array(String)} Supported application event types. |
| Properties | |
| handlerOptions | {Object} Used to set non-default properties on the control’s handler |
| persist | {Boolean} Keep the temporary measurement sketch drawn after the measurement is complete. |
| Constructor | |
| OpenLayers. Control. Measure | |
| Functions | |
| cancel | Stop the control from measuring. |
{Array(String)} Supported application event types. Register a listener for a particular event with the following syntax:
control.events.register(type, obj, listener);
Listeners will be called with a reference to an event object. The properties of this event depends on exactly what happened.
| 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. Listeners receive an event with measure, units, order, and geometry. |
{Boolean} Keep the temporary measurement sketch drawn after the measurement is complete. The geometry will persist until a new measurement is started, the control is deactivated, or cancel is called.
| handler | {OpenLayers.Handler} |
| options | {Object} |
cancel: function()
Stop the control from measuring. If persist is true, the temporary sketch will be erased.
Stop the control from measuring.
cancel: function()