diff --git a/tests/Format/WMTSCapabilities/v1_0_0.html b/tests/Format/WMTSCapabilities/v1_0_0.html index 81686b1fff..43de62a077 100644 --- a/tests/Format/WMTSCapabilities/v1_0_0.html +++ b/tests/Format/WMTSCapabilities/v1_0_0.html @@ -232,6 +232,29 @@ t.eq(layer.params['TIME'], "2012", "correct params"); } + function test_parse_projection(t) { + t.plan(2); + + var format = new OpenLayers.Format.WMTSCapabilities(); + + var xml = document.getElementById("restsample-alternate-proj1").firstChild.nodeValue; + var doc = new OpenLayers.Format.XML().read(xml); + var caps = format.read(doc); + var layer = format.createLayer(caps, { + layer: "ch.are.agglomerationen_isolierte_staedte-2000", + matrixSet: "21781" + }); + t.eq(layer.projection.getCode(), "EPSG:21781", "correct projection"); + + xml = document.getElementById("restsample-alternate-proj2").firstChild.nodeValue; + doc = new OpenLayers.Format.XML().read(xml); + caps = format.read(doc); + layer = format.createLayer(caps, { + layer: "ch.are.agglomerationen_isolierte_staedte-2000", + matrixSet: "21781" + }); + t.eq(layer.projection.getCode(), "EPSG:21781", "correct projection"); + } @@ -528,5 +551,156 @@ http://schemas.opengis.net/wmts/1.0/examples/wmtsGetCapabilities_response.xml --> + +
+ +
+