Skip to content
Works with Leaflet to capture mouseclicks on a map and display the associated coordinates with an easy way to copy them.
JavaScript CSS
Branch: master
Clone or download
Pull request Compare This branch is 27 commits ahead of zimmicz:master.
Latest commit d9f9829 Sep 26, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Adds var L to meet StandardJS Sep 13, 2019
.gitignore Housekeeping Sep 26, 2019
.npmignore Adds .vscode to .npmignore Sep 12, 2019
LICENSE.md Updates license Sep 10, 2019
README.md Updates README.md Sep 9, 2019
package-lock.json Fixes up package.json Sep 10, 2019
package.json Housekeeping Sep 26, 2019

README.md

Leaflet Copy Coordinates Control

Works with Leaflet to capture mouseclicks on a map and display the associated coordinates with an easy way to copy them.

Derived from original work by zimmicz. Forked mainly to provide npm functionality.

Demo

See demo here.

How to use

var c = new L.Control.Coordinates(); # you can send options to the constructor if you want to, otherwise default values are used

c.addTo(map);

map.on('click', function(e) {
	c.setCoordinates(e);
});
You can’t perform that action at this time.