By observing the input$map_marker_click event
; it will return both the x and y coordinates of a marker click, plus - and that can be extremely helpful - the unique layer_id
of the marker, if one was assigned during the addMarkers()
call.
For an example consider this post: Shiny: Using multiple exclusive reactiveValues for filtering dataset
It is built on top of the North Carolina shapefile, and can be run out of the box.