Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constant OpenLayers.INCHES_PER_UNIT[m] changed from 39.3701 to 39.37 since release 2.13 #1504

Open
nakamura2000 opened this issue Sep 27, 2016 · 2 comments

Comments

@nakamura2000
Copy link

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

@marcjansen
Copy link
Member

Does the explanation at the commit 893966d help?

@nakamura2000
Copy link
Author

nakamura2000 commented Sep 28, 2016

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants