alex3165 / react-mapbox-gl

A React binding of mapbox-gl-js
http://alex3165.github.io/react-mapbox-gl/
MIT License
1.93k stars 536 forks source link

Imperial units show up in odd amounts at scale <1 #986

Open saurya opened 2 years ago

saurya commented 2 years ago
Screen Shot 2021-12-20 at 8 40 32 PM

At scale 0.5, we see 2640 feet, it would be more sensible to the user if it said 2500 feet and the scale bar actually measured out to that.

saurya commented 2 years ago

If the scales that were used for imperial <1 were instead: 0.0095, 0.0190, 0.0474, 0.0947, 0.1894, 0.4735

instead of: 0.01,0.02,0.05,0.1,0.2,0.5

then the rest of the code could stay the same. This would mean a separate set of scales for Imperial that would need to get switched out in the setScale method