Geoportal Extension for OpenLayers 3 API Reference

Class: MeasureAzimuth

ol.control.MeasureAzimuth

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

new MeasureAzimuth(options)

Ol3/Controls/Measures/MeasureAzimuth.js, line 47
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.

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

Extends

  • ol.control.Control

Methods

isGeodesic(){Boolean}

Ol3/Controls/Measures/MeasureAzimuth.js, line 170

Getter for option Geodesic

Returns:
value

setGeodesic(value)

Ol3/Controls/Measures/MeasureAzimuth.js, line 161

Setter for option Geodesic

Name Type Description
value Boolean

geodesic value

setMap(map)

Ol3/Controls/Measures/MeasureAzimuth.js, line 116

Overwrite OpenLayers setMap method

Name Type Description
map ol.Map

Map.