Skip to content

turban/Leaflet.Graticule

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

Leaflet.Graticule

Generate a graticule grid of latitude and longitude lines.

API

L.graticule(options)

Create a new Graticule layer which inherits from L.GeoJSON. Options is an optional options object with the following properties:

  • interval: the gap between each graticule line, in degrees
  • style: path options for the generated lines

Example

// Add a basic graticule with divisions every 20 degrees
// as a layer on a map
L.graticule().addTo(map);

// Specify divisions every 10 degrees
L.graticule({ interval: 10 }).addTo(map);

// Specify bold red lines instead of thin grey lines
L.graticule({
    style: {
        color: '#f00',
        weight: 10
    }
}).addTo(map);

More information

About

Grid of latitude and longitude lines.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published