Closed ricobert1 closed 7 years ago
mapview::addMouseCoordinates
should give you the same thing. I am not inclined to duplicate this as it's already available in mapview.
https://github.com/r-spatial/mapview/blob/develop/R/addMouseCoordinates.R#L44
A nice plug-in built for Leaflet: Captures mouseclick and displays its coordinates with easy way to copy them. https://github.com/zimmicz/Leaflet-Coordinates-Control