Leaflet Coordinates Control
Captures mouseclick and displays its coordinates with easy way to copy them.
click here)
Demo (Installation
Install via npm
npm i leaflet-coordinates-control
Include as ES6 Module
;;
How to use
var c = L.control.coordinates().addTo(this.map);
this.map.on('click', function (e) {
c.setCoordinates(e);
});
Credit
This is my first leaflet plugin, this whole structure was based on the zimmicz project. So don't be surprised to see somefamiliar code.