I am using leaflet.js - which doesn’t have a setting like WpfMap.CurrentScale for example.
Unfortunatly in the web server we have some code that requires “Scale” as input (MapSuiteTileMatrix).
The question is how to calculate that scale.
In the JS client I managed to calculate a scale as meter per pixel - but the map data is in degrees.
So I would like to understand how scale is used in combination with degrees (e.g. in WPF edition), so that I can implement a formula.
I also have seen the comment on ZoomLevel.Scale:
/// The scale is the ratio of a single unit of distance on the map to the equivalent
/// distance on the ground. For example, a scale of 1:1 means that one foot on the ground
/// would be displayed as one foot on the screen. A scale of 1:1,000 means that one foot on
/// the screen is equal to 1,000 feet on the ground.
I made up a sample map that shows approx. 1 km (in WPF edition). CurrentScale is ~ 4500.
Following the formula 1 degree on the screen would be 4500 degree on the ground.
But then I still need to calculate how much degree 1px is. Probably 0.000…1 something.
How to get there?
To use the projection I need Lng and Lat values. If I use Lat=0 it might work, but would this be accurate?