R / Leaflet obtain clicked coordinates
Looks like you need more powerful tool to handle your problem. The solution in R may be using Shiny - basics in this link: https://rstudio.github.io/leaflet/shiny.html
input$MAPID_click
is an event that is sent when the map background or basemap is clicked. The value is a list withlat
andlng
.