Description Usage Arguments Value Examples
This function wraps round leaflet::addTiles
to provide access to the Targomo basemaps.
1 2 3 4 5 | addTargomoTiles(map, style = "basic",
api_key = Sys.getenv("TARGOMO_API_KEY"), layerId = NULL,
group = NULL, ...)
targomoMapStyles()
|
map |
A leaflet map |
style |
A valid Targomo Map Style - see |
api_key |
Your Targomo API key - defaults to the |
layerId |
The layer id to pass to |
group |
The layer group to pass to |
... |
Further options to pass to |
The leaflet map with the requested map tiles
1 2 3 4 5 6 7 8 9 10 11 | # load leaflet package
library(leaflet)
# add basic style to map
leaflet() %>% addTargomoTiles(style = "basic")
# add dark blue style to map (without labels)
leaflet() %>% addTargomoTiles(style = "darkblue-nolabels")
# list Targomo Map Styles
targomoMapStyles()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.