简体   繁体   中英

How to display the map scale in leaflet.js

I wonder how to display the scale map in leafleat.js. That is: I want this 在此处输入图片说明 instead of this 在此处输入图片说明 (taken to leaflet tutorial ). See the left corner of the picture.

You can take use of L.control.scale() . Here is an EXAMPLE . In it's options you can set width , position and scale system .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM