Class: Graticule

ol.Graticule

new ol.Graticule(opt_options) experimental

Name Type Description
options

Options.

Name Type Description
map ol.Map | undefined experimental

Reference to an ol.Map object.

maxLines number | undefined experimental

The maximum number of meridians and parallels from the center of the map. The default value is 100, which means that at most 200 meridians and 200 parallels will be displayed. The default value is appropriate for conformal projections like Spherical Mercator. If you increase the value more lines will be drawn and the drawing performance will decrease.

strokeStyle ol.style.Stroke | undefined experimental

The stroke style to use for drawing the graticule. If not provided, the lines will be drawn with rgba(0,0,0,0.2), a not fully opaque black.

targetSize number | undefined experimental

The target size of the graticule cells, in pixels. Default value is 100 pixels.

Methods

getMap(){ol.Map} experimental

Returns:
The map.

getMeridians(){Array.<ol.geom.LineString>} experimental

Returns:
The meridians.

getParallels(){Array.<ol.geom.LineString>} experimental

Returns:
The parallels.

setMap(map) experimental

Name Type Description
map ol.Map

Map.