EXPERIMENTAL, see https://deck.gl/#/examples/core-layers/tile-layer
add_raster_tile_layer(
deckgl,
id = "raster-tiles",
tileServer = "https://c.tile.openstreetmap.org/",
properties = list(),
...
)
A deckgl widget object.
The unique id of the layer.
base url of the tile server
A named list of properties with names corresponding to the properties defined
in the deckgl-api-reference
for the given layer class. The properties
parameter can also be an empty list. In this case
all props must be passed as named arguments.
Named arguments that will be added to the properties
object. Identical parameters
are overwritten.
## @knitr raster-tile-layer
tile_servers <- list(
osm = "https://a.tile.openstreetmap.org/",
carto_light = "https://cartodb-basemaps-a.global.ssl.fastly.net/light_all/",
carto_dark = "https://cartodb-basemaps-a.global.ssl.fastly.net/dark_all/",
stamen_toner = "http://a.tile.stamen.com/toner/"
)
deck <- deckgl() %>%
add_raster_tile_layer(
tileServer = tile_servers$osm,
pickable = TRUE,
autoHighlight = TRUE,
highlightColor = c(60, 60, 60, 40)
)
if (interactive()) deck