rewrite WMS GetCapabilities parser, tests now pass in IE, r=ahocevar (closes #2283)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@9883 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -33,14 +33,23 @@ OpenLayers.Format.WMSCapabilities.v1_1_0 = OpenLayers.Class(
|
||||
},
|
||||
|
||||
/**
|
||||
* Method: read_cap_SRS
|
||||
* Property: readers
|
||||
* Contains public functions, grouped by namespace prefix, that will
|
||||
* be applied when a namespaced node is found matching the function
|
||||
* name. The function will be applied in the scope of this parser
|
||||
* with two arguments: the node being read and a context object passed
|
||||
* from the parent.
|
||||
*/
|
||||
read_cap_SRS: function(layer, node) {
|
||||
var srs = this.getChildValue(node);
|
||||
var values = srs.split(/ +/);
|
||||
for (var i=0, len=values.length; i<len; i++) {
|
||||
layer.srs[values[i]] = true;
|
||||
}
|
||||
readers: {
|
||||
"wms": OpenLayers.Util.applyDefaults({
|
||||
"SRS": function(node, obj) {
|
||||
var srs = this.getChildValue(node);
|
||||
var values = srs.split(/ +/);
|
||||
for (var i=0, len=values.length; i<len; i++) {
|
||||
obj.srs[values[i]] = true;
|
||||
}
|
||||
}
|
||||
}, OpenLayers.Format.WMSCapabilities.v1_1.prototype.readers["wms"])
|
||||
},
|
||||
|
||||
CLASS_NAME: "OpenLayers.Format.WMSCapabilities.v1_1_0"
|
||||
|
||||
Reference in New Issue
Block a user