Implements custom units (and nautical miles) in the default leaflet scale control (introduced in 0.4)

bower install leaflet-customscale


Leaflet scale control in nautic miles (and / or custom units)

Extends the default leaflet scale control (introduced with 0.4), implementing

  • a scale control displaying the scale in nautical miles
  • a scale control which (by means of a simple callback function) allows you to implement whatever unit you wish

Both extensions are independent from each other, so you only need to include the one you want. See the example HTML files for a simple demo on how to use them.

Actual demos to play with can be found here for nautic scale and here for custom scale (which, in the demo, also implements scale in nautical miles).