-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
#364 is now happening with click-events
library(shinydashboard)
library(mapdeck)
library(sf)
set_token(secret::get_secret("MAPBOX"))
ui <- shinydashboard::dashboardPage(
header = shinydashboard::dashboardHeader()
, body = shinydashboard::dashboardBody(
mapdeck::mapdeckOutput(
outputId = "map"
)
)
, sidebar = shinydashboard::dashboardSidebar()
)
server <- function(input, output, session) {
nc <- sf::st_read(system.file("shape/nc.shp", package = "sf"))
output$map <- mapdeck::renderMapdeck({
mapdeck::mapdeck() %>%
add_polygon(
data = nc
)
})
observeEvent({input$map_polygon_click}, {
print(input$map_polygon_click)
})
}
shiny::shinyApp(ui = ui, server = server)Metadata
Metadata
Assignees
Labels
No labels