Open vstar1411 opened 9 months ago
@vstar1411
Since, this calculation would mean the number would decrease as we zoom out. Is this the required functionality?
Thank you for pointing that out. The expected behavior is the value should increase when we zoom out, not decrease.
I think the scale should be calculated as follows:
var scale = 1 / Math.pow(2, (_this.maxNativeZoom - this._map.getZoom()));
Thank you @sanosano for clarification. I will update the calculations and submit a pull request once I finish it. Also, one more thing what shall be the unit for distance (Is it in meters, millimetres, etc?)
I have used the calculations as given in the PDF but I am not sure if they are correct. I would like you to confirm that calculation for scale_bar value is correct as below
Since, this calculation would mean the number would decrease as we zoom out. Is this the required functionality?