Geoportal Extension for OpenLayers API Reference

Class: MeasureAzimuth

ol.control.MeasureAzimuth

Azimuth measurement Control. Allows users to draw a line on an Openlayers map and have its angle in decimal degrees clockwise from the geographical north.

new MeasureAzimuth(options)

OpenLayers/Controls/Measures/MeasureAzimuth.js, line 46
Name Type Description
options Object

options for function call.

Name Type Default Description
geodesic Boolean false optional

If true, azimuth will be computed on the global sphere. Otherwise, it will be computed on the projected plane.

styles Object {} optional

styles used when drawing. Specified with following properties.

Name Type Default Description
pointer Object {} optional

Style for mouse pointer when drawing the line. Specified with an ol.style.Image subclass object.

start Object {} optional

Line Style when drawing. Specified with an ol.style.Style object.

finish Object {} optional

Line Style when finished drawing. Specified with an ol.style.Style object.

layerDescription Object {} optional

Layer informations to be displayed in LayerSwitcher widget (only if a LayerSwitcher is also added to the map)

Name Type Default Description
title String "Mesures d'azimuth" optional

Layer title to be displayed in LayerSwitcher

description String "Mes mesures" optional

Layer description to be displayed in LayerSwitcher

Example
var measure = new ol.control.MeasureAzimuth({
  geodesic : true
});

Extends

  • ol.control.Control

Methods

isGeodesic(){Boolean}

OpenLayers/Controls/Measures/MeasureAzimuth.js, line 183

Getter for option Geodesic

Returns:
value

setGeodesic(value)

OpenLayers/Controls/Measures/MeasureAzimuth.js, line 174

Setter for option Geodesic

Name Type Description
value Boolean

geodesic value

setMap(map)

OpenLayers/Controls/Measures/MeasureAzimuth.js, line 113

Overwrite OpenLayers setMap method

Name Type Description
map ol.Map

Map.