Marker mouse click event in R leaflet for shiny
How can I receive a mouse click event on a marker in a leaflet map in R? I'm using the RStudio/leaflet and running through Shiny. I'd like to get the value of a marker (e.g., ID) and use that to update a sidebarPanel. SamanthaDS You want to use input$MAPID_marker_click . See the example below. library(shiny) library(leaflet) latitude <- c(35.94077, 35.83770, 35.84545, 35.81584, 35.79387, 36.05600) longitude <- c(-78.58010, -78.78084, -78.72444, -78.62568, -78.64262, -78.67600) radius<-c(15, 12, 12, 12, 12, 15) ids<-c("a", "b", "c", "d", "e", "f") shinyApp( ui = fluidPage( fluidRow( leafletMap(