From 3d1b0f0bd9b48a3d36917c77463e79624c0e21e9 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Tue, 2 Oct 2012 16:07:35 +0200 Subject: [PATCH] Less intrusive version fallback --- lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js | 5 +++++ lib/OpenLayers/Format/XML/VersionedOGC.js | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js b/lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js index 41f90be073..771a7b16a2 100644 --- a/lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js +++ b/lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js @@ -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; diff --git a/lib/OpenLayers/Format/XML/VersionedOGC.js b/lib/OpenLayers/Format/XML/VersionedOGC.js index c61584ff00..7b9ef90dfb 100644 --- a/lib/OpenLayers/Format/XML/VersionedOGC.js +++ b/lib/OpenLayers/Format/XML/VersionedOGC.js @@ -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;