简体   繁体   中英

In Openlayers can i have zoom rates 3m, 4m

Im using Openlayers in my project and i want to add some additional zoom rates as 3m, 4m. In Openlayers site i can see some fixed zoom rates only https://openlayers.org/en/latest/examples/scale-line.html

The below is my resolutions array for metric zoom scale rates with added for 3m and 4m

'metric': [2, 1, 0.5, 0.2, 0.1, 0.05, 0.04, 0.03, 0.02, 0.01]

which is like
          200m, 100m, 50m, 20m, 10m, 5m, 4m, 3m, 2m, 1m, 0.5m

With the above resolutions array im getting zooms for 4m and 3m in my map but in my scale display it shows as 5m for both 4m and 3m zooms. How can i make it display respective zoom rate on scale

you can check scale-line on openlayers. It's measure value changes even a simple pan. Maybe you can use in a local area with a specific projection.

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