1.0.2 • Published 5 years ago

leaflet-coordinates-control v1.0.2

Weekly downloads
12
License
MIT
Repository
github
Last release
5 years ago

Leaflet Coordinates Control

Captures mouseclick and displays its coordinates with easy way to copy them.

Demo (click here)

gyphy-mouse-coordinates-click-min

Installation

Install via npm

npm i leaflet-coordinates-control

Include as ES6 Module

import 'leaflet-coordinates-control';
import 'L.Control.Coordinates.css';

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.