Less intrusive version fallback
This commit is contained in:
@@ -116,3 +116,8 @@ OpenLayers.Format.WMSDescribeLayer.v1_1 = OpenLayers.Class(
|
||||
CLASS_NAME: "OpenLayers.Format.WMSDescribeLayer.v1_1"
|
||||
|
||||
});
|
||||
|
||||
// Version aliases - workaround for http://trac.osgeo.org/mapserver/ticket/2257
|
||||
OpenLayers.Format.WMSDescribeLayer.v1_1_1 =
|
||||
OpenLayers.Format.WMSDescribeLayer.v1_1_0 =
|
||||
OpenLayers.Format.WMSDescribeLayer.v1_1;
|
||||
|
||||
@@ -127,11 +127,6 @@ OpenLayers.Format.XML.VersionedOGC = OpenLayers.Class(OpenLayers.Format.XML, {
|
||||
var format = OpenLayers.Format[this.name][
|
||||
"v" + version.replace(/\./g, "_") + profile
|
||||
];
|
||||
if (!format && ~version.indexOf('.')) {
|
||||
// falling back to less specific parser
|
||||
return this.getParser(
|
||||
version.substr(0, version.lastIndexOf('.')));
|
||||
}
|
||||
if(!format) {
|
||||
throw "Can't find a " + this.name + " parser for version " +
|
||||
version + profile;
|
||||
|
||||
Reference in New Issue
Block a user