Leaflet for small spaces

Leaflet is a great lightweight JavaScript module for showing all kinds of maps – but not really small ones.

The next version 0.8 (currently dev) helps with that.

The next snippet creates a CRS called Metric, while similar to the Simple CRS, this one has a scale of exactly 1 meter and is not bounded by degrees of latitude/longitude.

Additionally, the next snippet is a patch to the Scale Control, that goes away with the Earth CRC and uses our custom one to display a perfect meter scale (and imperial, bah).

Update 15.7.2015:

https://github.com/Leaflet/Leaflet/commit/daac1ca559670b16c7f19e8758978d1b335ad57f

An example custom map is here.

Leave a Reply

Your email address will not be published. Required fields are marked *