Class: MeasureLength

ngeo.interaction.MeasureLength

Interaction dedicated to measure length.

See our live example: ../examples/measure.html

Constructor

new MeasureLength(format, gettextCatalog, [options]opt)

Parameters:
Name Type Attributes Description
format !ngeox.unitPrefix

The format function

gettextCatalog !angularGettext.Catalog

Gettext catalog.

[options] ngeox.interaction.MeasureOptions= <optional>

Options

Extends

Members

(nullable) continueMsg: Element

Message to show after the first point is clicked.

Overrides:

(protected) decimals: number|undefined

Defines the number of decimals to keep in the measurement. If not defined, then the default behaviour occurs depending on the measure type.

Inherited From:

format: ngeox.unitPrefix

The format function

(protected) precision: number|undefined

Defines the number of precision to keep in the measurement. If not defined, then the default behaviour occurs depending on the measure type.

Inherited From:

(protected) sketchFeature: ol.Feature

The sketch feature.

Inherited From:

startMsg: Element

The message to show when user is about to start drawing.

Inherited From:

Methods

(protected) createDrawInteraction(style, source)

Creates the draw interaction.

Parameters:
Name Type Description
style ol.style.Style|Array.|ol.StyleFunction|undefined

The sketchStyle used for the drawing interaction.

source ol.source.Vector

Vector source.

Overrides:
Returns:

getDrawInteraction()

Inherited From:
Returns:

getTooltipElement()

Get a reference to the tooltip element.

Inherited From:
Returns:
Element

Tooltip Element.

(protected) handleMeasure(callback)

Function implemented in inherited classes to compute measurement, determine where to place the tooltip and determine which help message to display.

Parameters:
Name Type Description
callback function(string, ?ol.Coordinate)

The function to be called.

Overrides:

setMap()

Inherited From: