Calculating maxResolution instead of having it in defaults.

This commit is contained in:
ahocevar
2012-02-15 21:07:48 +01:00
parent 2e423df3d2
commit 262e2d5bc0
6 changed files with 25 additions and 22 deletions

View File

@@ -167,26 +167,22 @@ OpenLayers.Projection.transforms = {};
* {Object} Defaults for the SRS codes known to OpenLayers (currently
* EPSG:4326, CRS:84, urn:ogc:def:crs:EPSG:6.6:4326, EPSG:900913, EPSG:3857,
* EPSG:102113 and EPSG:102100). Keys are the SRS code, values are units,
* maxExtent (the validity extent for the SRS), maxResolution (the maximum
* resolution commonly used in grid sets for this SRS) and yx (true if this
* SRS is known to have a reverse axis order).
* maxExtent (the validity extent for the SRS) and yx (true if this SRS is
* known to have a reverse axis order).
*/
OpenLayers.Projection.defaults = {
"EPSG:4326": {
units: "degrees",
maxExtent: [-180, -90, 180, 90],
maxResolution: 1.40625,
yx: true
},
"CRS:84": {
units: "degrees",
maxExtent: [-180, -90, 180, 90],
maxResolution: 1.40625
maxExtent: [-180, -90, 180, 90]
},
"EPSG:900913": {
units: "m",
maxExtent: [-20037508.34, -20037508.34, 20037508.34, 20037508.34],
maxResolution: 156543.03390625
maxExtent: [-20037508.34, -20037508.34, 20037508.34, 20037508.34]
}
};