'm' and 'Meters' in OpenLayers.INCHES_PER_UNIT are not the same

OpenLayers.INCHES_PER_UNIT.m should equal
OpenLayers.INCHES_PER_UNIT.Meters, just like OpenLayers.INCHES_PER_UNIT.km
should equal OpenLayers.Inches_PER_UNIT.Kilometers. This confusion probably
comes from mixing International inches with US Survey inches when compiling
the unit conversion list (1 meter is 39.37007874 International inches, but
39.37 US Survey inches. It may not be obvious, but 'inches'/'Inch' in
OpenLayers means US Survey inch, and 'IInch' means International inch).

This change also fixes offsets caused by incorrect resolution calculations in
OpenLayers.Format.WMTSCapabilities.
This commit is contained in:
ahocevar
2012-12-19 22:23:45 +01:00
parent c9fa5aabad
commit 893966dfae
2 changed files with 9 additions and 3 deletions

View File

@@ -962,8 +962,8 @@ OpenLayers.INCHES_PER_UNIT = {
'inches': 1.0,
'ft': 12.0,
'mi': 63360.0,
'm': 39.3701,
'km': 39370.1,
'm': 39.37,
'km': 39370,
'dd': 4374754,
'yd': 36
};