Making it more convenient to create WMTS layers from capabilities documents. The format now has a createLayer method that takes a capabilities response object and a layer configuration object. This returns a properly configured WMTS layer based on the layer and matrix definition found in the capabilities. Unless otherwise specified, the layer name will be derived from the advertised title, and the style identifier will be the advertised default. r=ahocevar (closes #2676)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@10449 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2010-07-02 16:11:37 +00:00
parent ef9afd22cb
commit 22aa4281fa
4 changed files with 119 additions and 39 deletions

View File

@@ -106,7 +106,7 @@ OpenLayers.Format.WMTSCapabilities.v1_0_0 = OpenLayers.Class(
},
"Style": function(node, obj) {
var style = {};
style.isDefault = node.getAttribute("isDefault");
style.isDefault = (node.getAttribute("isDefault") === "true");
this.readChildNodes(node, style);
obj.styles.push(style);
},