OpenLayers.Control.DynamicMeasure

Allows for drawing of features for measurements.

Inherits from

Summary
OpenLayers.Control.DynamicMeasureAllows 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.
Constructor
OpenLayers.Control.Measure
Functions
destroy
activate
deactivate
setImmediateSets the immediate property.
showLabel
Constants
OpenLayers.Control.DynamicMeasure.styles

Properties

accuracy

{Integer} Digits measurement accuracy, default is 5.

persist

{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, default is true.

immediate

{Boolean} Activates the immediate measurement so that the “measurepartial” event is also fired once the measurement sketch is modified.  Default is true.

Constructor

OpenLayers.Control.Measure

Parameters

handler{<OpenLayers.Handler>}
options{Object}

Valid options

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.

Functions

destroy

destroy: function()

activate

activate: function()

deactivate

deactivate: function()

setImmediate

setImmediate: function(immediate)

Sets the immediate property.  Changes the activity of immediate measurement.

showLabel

showLabel: function(layer,
index,
measure,
x,
y)

Parameters

pointsArray(<OpenLayers.Geometry.Point>)

Returns

{Boolean}

Constants

OpenLayers.Control.DynamicMeasure.styles

destroy: function()
activate: function()
deactivate: function()
setImmediate: function(immediate)
Sets the immediate property.
{Boolean} Activates the immediate measurement so that the “measurepartial” event is also fired once the measurement sketch is modified.
showLabel: function(layer,
index,
measure,
x,
y)
Close