[OpenLayers-Commits] r11135 - in trunk/openlayers: lib/OpenLayers/Format tests/Format/WMTSCapabilities

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Thu Feb 17 10:25:29 EST 2011


Author: fredj
Date: 2011-02-17 07:25:28 -0800 (Thu, 17 Feb 2011)
New Revision: 11135

Modified:
   trunk/openlayers/lib/OpenLayers/Format/WMTSCapabilities.js
   trunk/openlayers/tests/Format/WMTSCapabilities/v1_0_0.html
Log:
initialize the WMTS layer with style.identifier instead of the whole object. r=bartvde (closes #3027)

Modified: trunk/openlayers/lib/OpenLayers/Format/WMTSCapabilities.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Format/WMTSCapabilities.js	2011-02-17 15:08:18 UTC (rev 11134)
+++ trunk/openlayers/lib/OpenLayers/Format/WMTSCapabilities.js	2011-02-17 15:25:28 UTC (rev 11135)
@@ -149,7 +149,7 @@
                 OpenLayers.Util.applyDefaults(config, {
                     url: capabilities.operationsMetadata.GetTile.dcp.http.get,
                     name: layerDef.title,
-                    style: style,
+                    style: style.identifier,
                     matrixIds: matrixSet.matrixIds
                 })
             );

Modified: trunk/openlayers/tests/Format/WMTSCapabilities/v1_0_0.html
===================================================================
--- trunk/openlayers/tests/Format/WMTSCapabilities/v1_0_0.html	2011-02-17 15:08:18 UTC (rev 11134)
+++ trunk/openlayers/tests/Format/WMTSCapabilities/v1_0_0.html	2011-02-17 15:25:28 UTC (rev 11135)
@@ -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");
         }
         
     </script>



More information about the Commits mailing list