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
Describe the bug
I'm using update_style() along with an Rshiny selectInput() input to give the user the option to chance the background, but it seems to lock the zoom level and location of the map. I lose the ability to drag the map around with my mouse.
# ##############################################################################################
# ##############################################################################################
# # Sec 1a. Needed Libaries & Input Files
library(shiny)
library(shinydashboard)
library(mapdeck)
library(dplyr)
MapDeckStyleList <- c("dark", "light", "outdoors", "streets", "satellite", "satellite-streets")
##############################################################################################
##############################################################################################
#UI
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(
selectInput(inputId="MapDeckBGInput",label="Background Layer",
choices=MapDeckStyleList, selected="dark")
),
dashboardBody(
fluidRow(mapdeckOutput(outputId = 'mapA'))
)
)
##############################################################################################
##############################################################################################
server <- function(input, output) {
##The MapDeck Token
# key <- '## put your own token here ##'
set_token(key) ## set your access token
### The Map
output$mapA <- renderMapdeck({
mapdeck()
})
##Incremental Changes to the Map
observe({
mapdeck_update(map_id = 'mapA') %>%
update_style(style = mapdeck_style(input$MapDeckBGInput))
})
}
##############################################################################################
##############################################################################################
shinyApp(ui = ui, server = server)
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm using update_style() along with an Rshiny selectInput() input to give the user the option to chance the background, but it seems to lock the zoom level and location of the map. I lose the ability to drag the map around with my mouse.
The text was updated successfully, but these errors were encountered: