addGraticule: Add a Graticule on the map

View source: R/plugin-graticule.R

addGraticuleR Documentation

Add a Graticule on the map

Description

Add a Graticule on the map

Usage

addGraticule(
  map,
  interval = 20,
  sphere = FALSE,
  style = list(color = "#333", weight = 1),
  layerId = NULL,
  group = NULL,
  options = pathOptions(pointerEvents = "none", clickable = FALSE)
)

Arguments

map

a map widget object

interval

The spacing in map units between horizontal and vertical lines.

sphere

boolean. Default FALSE

style

path options for the generated lines. See https://web.archive.org/web/20220702182250/https://leafletjs.com/reference-1.3.4.html#path-option

layerId

the layer id

group

the name of the group this layer belongs to.

options

the path options for the graticule layer

See Also

https://github.com/turban/Leaflet.Graticule

Examples

leaf <- leaflet() %>%
  addTiles() %>%
  addGraticule()
leaf


rstudio/leaflet documentation built on Aug. 8, 2024, 11:06 a.m.