[Users] WMSCapabilitiesLoader and bad request

Marc-André Trottier marcandre_trottier at hotmail.com
Thu Sep 8 19:28:53 CEST 2011


hi!

i did some change in WMSCapabilitiesLoader.js to fire exception on bad
request.
i did some tests and it's seems to work.


Ext.override(GeoExt.tree.WMSCapabilitiesLoader, {

    processResponse : function(response, node, callback, scope){
        var capabilities = new OpenLayers.Format.WMSCapabilities().read(
            response.responseXML || response.responseText);

        if(!capabilities.capability){
            scope.loading = false;
            node.wmsbrowser.fireEvent('getcapabilitiesfail');
        }
        else{
            this.processLayer(capabilities.capability,
                capabilities.capability.request.getmap.href, node);
            if (typeof callback == "function") {
                callback.apply(scope || node, [node]);
            }
        }
    }
});

Marc-André Trottier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110908/8b7a2173/attachment.htm 


More information about the Users mailing list