I am trying to use the resolution passed to the StyleFunction to determine the size of my images. Using tests, when scaling, where the scale line is 100 m, the resolution reported by the stylistic function is 2.3886.
I take screenshots of the scale line and measure its length in pixels. The 100 mm scaling line is 68 pixels or 1.4705 m per pixel.
1.4705! == 2.3886, so what is a permission block? The API documentation does not explain this and says that it is just a number, but without the idea of ββunits it is difficult to develop.
This is an exact scaling of the icon to the length of the real world BTW.
Using this jsfiddle.net/dz9gL0g0/, I found that 200 m scalping reports 2.38, but 100 m less (1.19). Is the resolution that I get from a previous scalable level? If I use the resolution passed to OR calling the getResolution function directly, the 100m scaleline always returns 2.83 for me, not 1.19, I think it should, although 1.19 * 84 is basically correct (the scale line is larger in the example than my application that gives me a line of scale of 68 pixels for 100 m).
Moving the window changes the resolution - resize the jsfiddle and change the resolution block. My 100mm scalping still matches the geographic function I use for testing, but now reports 2.38.
source
share