From 1f042af289ea0abd53e013fcded428297d13ac17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Junod?= Date: Thu, 17 Feb 2011 15:25:28 +0000 Subject: [PATCH] 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 --- lib/OpenLayers/Format/WMTSCapabilities.js | 2 +- tests/Format/WMTSCapabilities/v1_0_0.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/OpenLayers/Format/WMTSCapabilities.js b/lib/OpenLayers/Format/WMTSCapabilities.js index a5959e25b5..bf9e62686f 100644 --- a/lib/OpenLayers/Format/WMTSCapabilities.js +++ b/lib/OpenLayers/Format/WMTSCapabilities.js @@ -149,7 +149,7 @@ OpenLayers.Format.WMTSCapabilities = OpenLayers.Class(OpenLayers.Format.XML, { OpenLayers.Util.applyDefaults(config, { url: capabilities.operationsMetadata.GetTile.dcp.http.get, name: layerDef.title, - style: style, + style: style.identifier, matrixIds: matrixSet.matrixIds }) ); diff --git a/tests/Format/WMTSCapabilities/v1_0_0.html b/tests/Format/WMTSCapabilities/v1_0_0.html index 176a054d2f..867066772b 100644 --- a/tests/Format/WMTSCapabilities/v1_0_0.html +++ b/tests/Format/WMTSCapabilities/v1_0_0.html @@ -110,7 +110,7 @@ } function test_createLayer(t) { - t.plan(6); + t.plan(7); var format = new OpenLayers.Format.WMTSCapabilities(); @@ -153,7 +153,7 @@ t.eq(layer.matrixIds.length, 2, "correct matrixIds length"); t.eq(layer.name, "Coastlines", "correct layer title"); - + t.eq(layer.style, "DarkBlue", "correct style identifier"); }