Fixes for the WMTS layer to properly update matrix related properties. Determining the best matrix in the set based on current map resolution. Properly parsing TopLeftCorner coordinates and providing a way to specify identifiers for backwards CRS. r=ahocevar (closes #2677)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10570 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2010-08-03 15:21:06 +00:00
parent f89fb1f226
commit 31afaf1fca
7 changed files with 217 additions and 81 deletions
+16 -3
View File
@@ -31,7 +31,20 @@ OpenLayers.Format.WMTSCapabilities = OpenLayers.Class(OpenLayers.Format.XML, {
* Property: parser
* {<OpenLayers.Format>} A cached versioned format used for reading.
*/
parser: null,
parser: null,
/**
* APIProperty: yx
* {Object} Members in the yx object are used to determine if a CRS URN
* corresponds to a CRS with y,x axis order. Member names are CRS URNs
* and values are boolean. By default, the following CRS URN are
* assumed to correspond to a CRS with y,x axis order:
*
* * urn:ogc:def:crs:EPSG::4326
*/
yx: {
"urn:ogc:def:crs:EPSG::4326": true
},
/**
* Constructor: OpenLayers.Format.WMTSCapabilities
@@ -70,9 +83,9 @@ OpenLayers.Format.WMTSCapabilities = OpenLayers.Class(OpenLayers.Format.XML, {
if (!constr) {
throw new Error("Can't find a WMTS capabilities parser for version " + version);
}
var parser = new constr(this.options);
this.parser = new constr(this.options);
}
return parser.read(data);
return this.parser.read(data);
},
/**