initialize the WMTS layer with style.identifier instead of the whole object. r=bartvde (closes #3027)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@11135 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Frédéric Junod
2011-02-17 15:25:28 +00:00
parent 3db27d7832
commit 1f042af289
2 changed files with 3 additions and 3 deletions

View File

@@ -149,7 +149,7 @@ OpenLayers.Format.WMTSCapabilities = OpenLayers.Class(OpenLayers.Format.XML, {
OpenLayers.Util.applyDefaults(config, { OpenLayers.Util.applyDefaults(config, {
url: capabilities.operationsMetadata.GetTile.dcp.http.get, url: capabilities.operationsMetadata.GetTile.dcp.http.get,
name: layerDef.title, name: layerDef.title,
style: style, style: style.identifier,
matrixIds: matrixSet.matrixIds matrixIds: matrixSet.matrixIds
}) })
); );

View File

@@ -110,7 +110,7 @@
} }
function test_createLayer(t) { function test_createLayer(t) {
t.plan(6); t.plan(7);
var format = new OpenLayers.Format.WMTSCapabilities(); var format = new OpenLayers.Format.WMTSCapabilities();
@@ -153,7 +153,7 @@
t.eq(layer.matrixIds.length, 2, "correct matrixIds length"); t.eq(layer.matrixIds.length, 2, "correct matrixIds length");
t.eq(layer.name, "Coastlines", "correct layer title"); t.eq(layer.name, "Coastlines", "correct layer title");
t.eq(layer.style, "DarkBlue", "correct style identifier");
} }
</script> </script>