tiles.Rd
This function wraps round leaflet::addTiles
to provide access to the Targomo basemaps.
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
# \donttest{ # 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()#> [1] "basic" "bright" "dark" #> [4] "dark-nolabels" "darkblue" "darkblue-nolabels" #> [7] "gray" "gray-nolabels" "light" #> [10] "light-nolabels" "lightblue" "toner"