Constructor
new MeasureAzimut(unitPrefixFormat, numberFormat, [opt_options]opt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
unitPrefixFormat |
!ngeox.unitPrefix | The format function |
|
numberFormat |
!ngeox.number | The format function |
|
[opt_options] |
!ngeox.interaction.MeasureOptions= |
<optional> |
Options |
Fires:
- ol.interaction.Draw.event:Event
Extends
Members
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:
numberFormat: ngeox.number
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:
unitPrefixFormat: ngeox.unitPrefix
The format function
Methods
(static) getAzimut(line)
Compute azimut from a 2 points line.
Parameters:
Name | Type | Description |
---|---|---|
line |
ol.geom.LineString | LineString. |
Returns:
Azimut value.
(static) getFormattedAzimut(line, decimals, format)
Format measure output of azimut.
Parameters:
Name | Type | Description |
---|---|---|
line |
!ol.geom.LineString | LineString. |
decimals |
number|undefined | Decimals. |
format |
!ngeox.number | The format function. |
Returns:
Formatted measure.
(static) getFormattedAzimutRadius(line, projection, decimals, precision, formatLength, formatAzimut)
Format measure output of azimut and radius.
Parameters:
Name | Type | Description |
---|---|---|
line |
!ol.geom.LineString | LineString. |
projection |
!ol.proj.Projection | Projection of the polygon coords. |
decimals |
number|undefined | Decimals. |
precision |
number|undefined | Precision. |
formatLength |
!ngeox.unitPrefix | The format function. |
formatAzimut |
!ngeox.number | The format function. |
Returns:
Formatted measure.
(protected) createDrawInteraction(style, source)
Creates the draw interaction.
Parameters:
Name | Type | Description |
---|---|---|
style |
ol.style.Style|Array. |
The sketchStyle used for the drawing interaction. |
source |
ol.source.Vector | Vector source. |
Returns:
getDrawInteraction()
- Inherited From:
Returns:
getTooltipElement()
Get a reference to the tooltip element.
- Inherited From:
Returns:
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: