2.0.0 • Published 4 months ago

leaflet-auto-graticule v2.0.0

Weekly downloads
121
License
BSD-2-Clause
Repository
github
Last release
4 months ago

Leaflet.AutoGraticule

A graticule for maps showing Latitude and Longitude, with automatic adjustment to the zoom level.

Based on Leaflet.SimpleGraticule.

Demo\ Demo on FacilMap

Usage

If you are using a module bundler, you can install Leaflet.AutoGraticule using npm install -S leaflet-auto-graticule and use it in your code like so:

import AutoGraticule from "leaflet-auto-graticule";

new AutoGraticule().addTo(map);

TypeScript is supported. Note that when including Leaflet.AutoGraticule like this, L.AutoGraticule is not available on the global L leaflet object.

If you want to use Leaflet.AutoGraticule in a static HTML page, load it after Leaflet:

<script src="https://unpkg.com/leaflet"></script>
<script src="https://unpkg.com/leaflet-auto-graticule"></script>
<script>
    new L.AutoGraticule().addTo(map);
</script>

Options

var options = {
    /** Leaflet map event on which to redraw the graticule. */
    redraw: 'moveend',

    /** Minimum distance in pixels between two graticule lines. */
    minDistance: 100
};

new L.AutoGraticule(options).addTo(map);
2.0.0

4 months ago

1.1.2

1 year ago

1.1.1

1 year ago

1.1.0

2 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago