1.0.0 • Published 5 years ago

leaflet.simplescale v1.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Introduction

Leaflet.SimpleScale is a simple scale control for leaflet , it's style is similar to Baidu map

Demo

https://hugemountain.github.io/leaflet-simplescale/

Usage

 L.control.simplescale({
   zh: true, //If true, use Chinese units, otherwise use English units
   position: "bottomleft",
   maxWidth: 100,   //比例尺div最大宽度 单位px
   metric: true,   //show the metric scale line (m/km)
   imperial: false,  //show the imperial scale line (mi/ft)
   updateWhenIdle: false  //If true, the control is updated on moveend, otherwise updated on move.
 }).addTo(map);

Reference Document

https://github.com/daniellsu/leaflet-betterscale