Hi,

While using the WMSCapabilitiesLoader, if a WMS GetCapabilities request returns an empty responseText or responseXML, the method that loads the 'capabilities' objet is called but doesn't check if it's populated with capability features.

The attached patch fixes the issue. Is it worth opening a ticket ? If so, please let me know and I'd do it and attach the patch.

Best regards,

--
Alexandre Dubé
Mapgears
www.mapgears.com

Index: lib/GeoExt/widgets/tree/WMSCapabilitiesLoader.js
===================================================================
--- lib/GeoExt/widgets/tree/WMSCapabilitiesLoader.js	(revision 2557)
+++ lib/GeoExt/widgets/tree/WMSCapabilitiesLoader.js	(working copy)
@@ -73,7 +73,7 @@
     processResponse : function(response, node, callback, scope){
         var capabilities = new OpenLayers.Format.WMSCapabilities().read(
             response.responseXML || response.responseText);
-        this.processLayer(capabilities.capability,
+        capabilities.capability && this.processLayer(capabilities.capability,
             capabilities.capability.request.getmap.href, node);
         if (typeof callback == "function") {
             callback.apply(scope || node, [node]);
_______________________________________________
Dev mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/dev

Reply via email to