Class: Graticule

ol.Graticule

new ol.Graticule(opt_options) experimental

src/ol/graticule.js, line 19
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

src/ol/graticule.js, line 277
Returns:
The map.

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

src/ol/graticule.js, line 306
Returns:
The meridians.

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

src/ol/graticule.js, line 335
Returns:
The parallels.

setMap(map) experimental

src/ol/graticule.js, line 423
Name Type Description
map ol.Map

Map.