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 @@