ol2
ol2 copied to clipboard
Constant OpenLayers.INCHES_PER_UNIT[m] changed from 39.3701 to 39.37 since release 2.13
Constant 'INCHES_PER_UNIT' has from 39.3701 to 39.37 since release 2.13 That change causes layer of meter unit to be displayed in slightly different position.
'INCHES_PER_UNIT' is defined in Util.js
https://github.com/openlayers/ol2/blob/master/lib/OpenLayers/Util.js
Does the explanation at the commit 893966dfae6e9f2e376e08eccbf6b4474de56cd7 help?
Thank you for response.
I can not understand 893966d perfectly, but case when base layer is Web Mercator tile and map unit is meter and calculating scale by map.getScale(), you have to use international inch. OL 2.13.1 uses us survey inch.
Link below says map scale is calculated with 1/0.0254 (international inch 39.370078 ... )
https://msdn.microsoft.com/ja-jp/library/bb259689.aspx?lang=ja-jp
map scale = 1 : ground resolution * screen dpi / 0.0254 meters/inch
On the other hand, OpenLayers.Util.getScaleFromResolution() uses INCHES_PER_UNIT 'm' ( 39.37 : us survey inch)