From f4d60b89a8046c6aa13d17bba9ab9ab24d3aa3ab Mon Sep 17 00:00:00 2001 From: bartvde Date: Mon, 20 Jul 2009 12:18:02 +0000 Subject: [PATCH] add parsing of layer name in WMS DescribeLayer format, r=elemoine (closes #2027) git-svn-id: http://svn.openlayers.org/trunk/openlayers@9570 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js | 4 +++- tests/Format/WMSDescribeLayer.html | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js b/lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js index cc951af348..cd174435a7 100644 --- a/lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js +++ b/lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js @@ -59,6 +59,7 @@ OpenLayers.Format.WMSDescribeLayer.v1_1 = OpenLayers.Class( childNode = children[i]; nodeName = childNode.nodeName; if (nodeName == 'LayerDescription') { + var layerName = childNode.getAttribute('name'); var owsType = ''; var owsURL = ''; var typeName = ''; @@ -85,7 +86,8 @@ OpenLayers.Format.WMSDescribeLayer.v1_1 = OpenLayers.Class( typeName = query[0].getAttribute('typename'); } } - describelayer.push({owsType: owsType, owsURL: owsURL, typeName: typeName}); + describelayer.push({layerName: layerName, owsType: owsType, + owsURL: owsURL, typeName: typeName}); } } return describelayer; diff --git a/tests/Format/WMSDescribeLayer.html b/tests/Format/WMSDescribeLayer.html index 7c962a6da3..30ebaffc82 100644 --- a/tests/Format/WMSDescribeLayer.html +++ b/tests/Format/WMSDescribeLayer.html @@ -4,7 +4,7 @@