View source: R/vector_tile_helpers.R
geom_transit | R Documentation |
Adds a transit layer for the map
geom_transit(
...,
color = "darkmagenta",
width = 0.1,
nextzen_api_key = getOption("nextzen_API_key"),
tile_size_px = NULL,
transform = function(d) d[d$kind %in% c("subway", "train"), ]
)
... |
extra arguments |
color |
color for the transit lines |
width |
width of transit lines |
nextzen_api_key |
nextzen API key for vector tile data |
tile_size_px |
tile size in pixels, may increase resolution of tile data |
transform |
transform function to apply to the vector tile data, by default filter out ferry lines |
a geom_sf object with the layer
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.