How to “save” click events in Leaflet Shiny map
What I want to do is pretty simple. I want to be able to save all click events on a Shiny/Leaflet map. Here's some example code: library(raster) library(shiny) library(leaflet) #load shapefile rwa <- getData("GADM", country = "RWA", level = 1) shinyApp( ui = fluidPage( leafletOutput("map") ), server <- function(input, output, session){ #initial map output output$map <- renderLeaflet({ leaflet() %>% addTiles() %>% addPolygons(data = rwa, fillColor = "white", fillOpacity = 1, color = "black", stroke = T, weight = 1, layerId = rwa@data$OBJECTID, group = "regions") }) #END RENDER LEAFLET