Open anthonynorth opened 3 years ago
Hey, realise this is an older post; here as an integrated solution using bslib which wraps the map in a container that can generate a full screen map:
library(rdeck)
library(bslib)
Sys.setenv("MAPBOX_ACCESS_TOKEN" = 'fruit-salad')
rdeck::mapbox_access_token()
card(fillable=T, full_screen = T, height = 300,
rdeck(
map_style = 'https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json',
initial_view_state = view_state(center = c(146,-20), zoom =4),
editor = F,
layer_selector = TRUE
)
)
So far have been using this approach in both quarto documents and shinyapps; works well in both.
Add a map control to toggle fullscreen on & off for a single map.