Skip to content

Displays a lat/lng grid overlay on Leaflet maps.

Notifications You must be signed in to change notification settings

der-stefan/Leaflet.Grid

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Leaflet.Grid

Display a grid overlay on a Leaflet map.

Usage

Leaflet.Grid needs some CSS to look pretty:

.leaflet-grid-label .lng {
	margin-left: 8px;
	-webkit-transform: rotate(90deg);
	transform: rotate(90deg);
}

Then, after including the L.Grid.js file and creating the map, just call:

L.grid().addTo(map);

You can redraw the grid on every movement (default) or on the end of the movement by setting the option redraw: 'moveend':

L.grid({
	redraw: 'moveend'
}).addTo(map);

TODO

  • Fix snapping / tick size for small zoomlevels

Ideas

  • Make center fixable
  • Wrapping of big longitudes

About

Displays a lat/lng grid overlay on Leaflet maps.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 94.3%
  • CSS 5.7%