re-added the layer prefix property that got lost with r9883. r=bartvde (closes #2283)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9931 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
ahocevar
2010-01-04 17:59:24 +00:00
parent 2619586558
commit f6b00d7ced
2 changed files with 8 additions and 1 deletions

View File

@@ -345,6 +345,12 @@ OpenLayers.Format.WMSCapabilities.v1 = OpenLayers.Class(
};
obj.nestedLayers.push(layer);
this.readChildNodes(node, layer);
if(layer.name) {
var parts = layer.name.split(":");
if(parts.length > 0) {
layer.prefix = parts[0];
}
}
},
"Attribution": function(node, obj) {
obj.attribution = {};