Allows for drawing of features for measurements.
| OpenLayers. | Allows for drawing of features for measurements. |
| Properties | |
| accuracy | {Integer} Digits measurement accuracy, default is 5. |
| persist | {Boolean} Keep the temporary measurement sketch drawn after the measurement is complete. |
| immediate | {Boolean} Activates the immediate measurement so that the “measurepartial” event is also fired once the measurement sketch is modified. |
| layerSegments | {<OpenLayers.Layer.Vector>} The temporary drawing layer to show the length of the segments. |
| layerSegments | {<OpenLayers.Layer.Vector>} The temporary drawing layer to show total length. |
| layerArea | {<OpenLayers.Layer.Vector>} The temporary drawing layer to show total area. |
| dynamicObj | {Object} Internal use. |
| isArea | {Boolean} Internal use. |
| Constructor | |
| OpenLayers. | |
| Functions | |
| destroy | |
| draw | This control does not have HTML component, so this method should be empty. |
| activate | |
| deactivate | |
| setImmediate | Sets the immediate property. |
| callbackCreate | |
| callbackPoint | |
| callbackModify | |
| showLabelSegment | |
| showLabel | |
| setMesureAttributes | Format measure[0] with digits of accuracy. |
| Constants | |
| OpenLayers. |
| handler | {<OpenLayers.Handler>} |
| options | {Object} |
| styles | {Object} Alterations of styles along the lines of default on OpenLayers.Control.DynamicMeasure.styles, can use keys, “Point”, “Line”, “Polygon”, “labelSegments”, “labelLength”, “labelArea”. |
| handlerOptions | {Object} Used to set non-default properties on the control’s handler. If `layerOptions[“styleMap”]` is set then the keys: “Point”, “Line” and “Polygon” of the `styles` option are ignored. |
| layerSegmentsOptions | {Object} Any optional properties to be set on the layer of layerSegments of the lengths of the segments. If `styleMap` is set then the key “labelSegments” of the `styles` option is ignored. If set to null the layer does not act. |
| layerLengthOptions | {Object} Any optional properties to be set on the layer of <layerLength> of the total length. If `styleMap` is set then the key “labelLength” of the `styles` option is ignored. If set to null the layer does not act. |
| layerAreaOptions | {Object} Any optional properties to be set on the layer of layerArea of the total area. If `styleMap` is set then the key “labelArea” of the `styles` option is ignored. If set to null the layer does not act. |
setImmediate: function( immediate )
Sets the immediate property. Changes the activity of immediate measurement.
setMesureAttributes: function( attributes, measure )
Format measure[0] with digits of accuracy. Could internationalize the format customizing <OpenLayers.Number.thousandsSeparator> and <OpenLayers.Number.decimalSeparator>
| attributes | {object} Target attributes. |
| measure | Array({*}) |
destroy: function()
This control does not have HTML component, so this method should be empty.
draw: function()
activate: function()
deactivate: function()
Sets the immediate property.
setImmediate: function( immediate )
callbackCreate: function()
callbackPoint: function( point, geometry )
callbackModify: function( point, feature, drawing )
showLabelSegment: function( layer, index, points )
showLabel: function( layer, index, measure, x, y )
Format measure[0] with digits of accuracy.
setMesureAttributes: function( attributes, measure )