diff --git a/lib/OpenLayers.js b/lib/OpenLayers.js index 5cb60a8243..a86b6c8704 100644 --- a/lib/OpenLayers.js +++ b/lib/OpenLayers.js @@ -285,6 +285,7 @@ "OpenLayers/Format/WMSCapabilities/v1_1_1.js", "OpenLayers/Format/WMSCapabilities/v1_3.js", "OpenLayers/Format/WMSCapabilities/v1_3_0.js", + "OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js", "OpenLayers/Format/WMSGetFeatureInfo.js", "OpenLayers/Format/SOSCapabilities.js", "OpenLayers/Format/SOSCapabilities/v1_0_0.js", diff --git a/lib/OpenLayers/Format/WMSCapabilities.js b/lib/OpenLayers/Format/WMSCapabilities.js index c754bd096d..49396b73a8 100644 --- a/lib/OpenLayers/Format/WMSCapabilities.js +++ b/lib/OpenLayers/Format/WMSCapabilities.js @@ -28,6 +28,15 @@ OpenLayers.Format.WMSCapabilities = OpenLayers.Class(OpenLayers.Format.XML, { */ version: null, + /** + * APIProperty: profile + * {String} If provided, use a custom profile. + * + * Currently supported profiles: + * - WMSC - parses vendor specific capabilities for WMS-C. + */ + profile: null, + /** * Property: parser * {} A cached versioned format used for reading. @@ -63,12 +72,14 @@ OpenLayers.Format.WMSCapabilities = OpenLayers.Class(OpenLayers.Format.XML, { } var root = data.documentElement; var version = this.version || root.getAttribute("version") || this.defaultVersion; + var profile = this.profile ? "_" + this.profile : ""; if(!this.parser || this.parser.version !== version) { var constr = OpenLayers.Format.WMSCapabilities[ - "v" + version.replace(/\./g, "_") + "v" + version.replace(/\./g, "_") + profile ]; if(!constr) { - throw "Can't find a WMS capabilities parser for version " + version; + throw "Can't find a WMS capabilities parser for version " + + version + profile; } this.parser = new constr(this.options); } diff --git a/tests/list-tests.html b/tests/list-tests.html index a52a98a949..a364f9ec7a 100644 --- a/tests/list-tests.html +++ b/tests/list-tests.html @@ -83,6 +83,7 @@
  • Format/WMC/v1.html
  • Format/WMSCapabilities.html
  • Format/WMSCapabilities/v1_1_1.html
  • +
  • Format/WMSCapabilities/v1_1_1_WMSC.html
  • Format/WMSCapabilities/v1_3_0.html
  • Format/WMSDescribeLayer.html
  • Format/WMSGetFeatureInfo.html