Adding more complete WMS capabilities parsing. Thanks trondmm for the comprehensive patch. Some minor changes by me - including leaving the srs member value an object. r=me (closes #2164)

git-svn-id: http://svn.openlayers.org/trunk/openlayers@9664 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2009-09-11 22:48:56 +00:00
parent 912a12c0b8
commit 7f240d3ba9
4 changed files with 708 additions and 22 deletions
@@ -32,6 +32,22 @@ OpenLayers.Format.WMSCapabilities.v1_1_1 = OpenLayers.Class(
);
},
/**
* Method: read_cap_SRS
*/
read_cap_SRS: function(layer, node) {
var srs = this.getChildValue(node);
if (srs.indexOf(" ")) {
// v1.1.0 style SRS
var values = srs.split(/ +/);
for (var i=0, len=values.length; i<len; i++) {
layer.srs[values[i]] = true;
}
} else {
layer.srs[srs] = true;
}
},
CLASS_NAME: "OpenLayers.Format.WMSCapabilities.v1_1_1"
});