Open ratnanil opened 1 year ago
This is not currently possible. I keep intending to look into this but just don't have the time. If you know of a solution I'll happily accept a PR
I got mapdeck
working with .json files that specify basemap layers. And you can change the .json to customize the tile layers. Below will also work if you save the .json and modify it locally.
Example below, drawing on carto's base layers
library(mapdeck)
library(jsonlite)
style.pth <- "https://raw.githubusercontent.com/CartoDB/basemap-styles/master/mapboxgl/dark-matter-nolabels.json"
style.json <- jsonlite::read_json(style.pth)
mapdeck::mapdeck(
style = style.json
#"https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"
,location = c(-73.9165, 40.7514)
,zoom = 10
)
@kmcd39 you don't need the jsonlite::read_json()
step, the style
argument will accept the URL as input:
mapdeck::mapdeck(
style = style.pth
,location = c(-73.9165, 40.7514)
,zoom = 10
)
Is there a way to use custom base maps with mapdeck? I'm thinking along the lines of the OSM slippy maps. There is something on this topic on deck.gl.