Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fullscreen control #32

Open
anthonynorth opened this issue Mar 19, 2021 · 1 comment
Open

Fullscreen control #32

anthonynorth opened this issue Mar 19, 2021 · 1 comment
Labels
feature New feature or request

Comments

@anthonynorth
Copy link
Member

Add a map control to toggle fullscreen on & off for a single map.

@anthonynorth anthonynorth added the feature New feature or request label Mar 19, 2021
@pdbentley
Copy link

pdbentley commented May 2, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants