tile_layer | R Documentation |
Add a tile layer to a d3-carto-map.
tile_layer(carto, provider = c("stamen", "mapbox"), path = "toner-lite", label = "Tiles", visible = TRUE)
carto |
The map created by |
provider |
The name of the provider of the map tiles. d3-carto-map
currently supports |
path |
The string that identifies the type of tiles from the provider. Stamen's free tile options include these:
Tile options from
Mapbox take the form of |
label |
The label for this layer on the layer selector. |
visible |
Should the layer be initially visible? |
cartographer
cartographer(region = "Africa") %>% tile_layer() %>% tile_layer(provider = "mapbox", path = "mapbox.world-bright", label = "World Bright") %>% tile_layer(provider = "mapbox", path = "mapbox.natural-earth-1", label = "Natural Earth") %>% tile_layer(provider = "mapbox", path = "mapbox.geography-class", label = "Geography")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.