Class: Graticule
×
This documentation is for OpenLayers v
3.20.0 . The
latest is v
.
new ol.Graticule(opt_options )
experimental
src/ol/graticule.js, line 20
Render a grid for a coordinate system on a map.
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 321
Get the map associated with this graticule.
Returns:
The map.
Get the list of meridians. Meridians are lines of equal longitude.
Returns:
The meridians.
Get the list of parallels. Pallels are lines of equal latitude.
Returns:
The parallels.
setMap(map)
experimental
src/ol/graticule.js, line 520
Set the map for this graticule. The graticule will be rendered on the
provided map.
Name
Type
Description
map
ol.Map
Map.