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 (?).
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 (?).