You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, attempting something similar with add_basemap() results in no change. The only workaround I have found is calling renderDeckgl() anew each time I want to use a Shiny button to change the basemap, which I'd like to avoid. In JS this appears to be related to setProps (?).
The text was updated successfully, but these errors were encountered:
lspoletini-d3
changed the title
Change MapStyle using Shiny buttons
Toggle Basemap in Shiny
May 30, 2024
Hello. I'm wondering if there is a way to switch between basemaps using Shiny buttons.
Currently, the below works great for my interactivity needs dealing with polygon and scatterplot layers.
observeEvent( input$someinput, {
deckgl_proxy("mymap") %>%
add_x_layer(...) %>%
add_y_layer(...) %>%
update_deckgl (it="works")
})
However, attempting something similar with add_basemap() results in no change. The only workaround I have found is calling renderDeckgl() anew each time I want to use a Shiny button to change the basemap, which I'd like to avoid. In JS this appears to be related to setProps (?).
The text was updated successfully, but these errors were encountered: