Leaflet plugin that creates scale bars along top and right edge of map in Web Mercator projection.
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE Initial commit Jan 31, 2018
README.md Update README.md Jan 31, 2018
leaflet.edgescalebar.js Update leaflet.edgescalebar.js Jan 31, 2018

README.md

Leaflet.EdgeScaleBar

Leaflet plugin that creates scale bars along top and right edge of a map in the Web Mercator projection.

Change of linear scale with latitude in Web Mercator projection can affect determination of distances from the map, especially for large areas. Standard scale bar corresponds to the map center. This plugin gives variable scale bar along map edges (concept used on nautical charts) which can be used to see the effect of linear scale change or for estimation of distances between objects. Simply by panning the map one can bring part of the map closer to the scale bar and estimate distance or size.

EdgeScaleBar for Leaflet

See the demo.

To add edge scale bar to your map in Web Mercator projection include the script leaflet.edgescalebar.js and add scale bar to your map:

L.edgeScaleBar().addTo(map);

Authors: Dražen Tutić (dtutic@geof.hr) and Ana Kuveždić Divjak (akuvezdic@geof.hr), University of Zagreb, Faculty of Geodesy, GEOF-OSGL Lab