[OpenLayers-Users] Is there a way to know if an error occurred while loading a WMS layer, in OpenLayers 2?

João Rodrigues joaorodr84 at gmail.com
Wed May 28 05:15:07 PDT 2014


Hi.

I am working with OpenLayers 2. I am using the events "loadstart" and
"loadend" from here<http://dev.openlayers.org/docs/files/OpenLayers/Layer-js.html#OpenLayers.Layer.events>
.

When I use OpenLayers.Layers.WMS, i want to have some kind of callback when
there is a loading error. For example, when I enter an incorrect SLD
filter, I want to have some feedback about the layer not being loaded
correctly. Unfortunately, "loadend" doesn't provide this kind of error
detection.

I already found this
question<http://lists.osgeo.org/pipermail//openlayers-users/2012-January/023772.html>
where
someone else has the same problem.

In my searches, I have found this
patch<http://trac.osgeo.org/openlayers/ticket/3265>for "loadfail",
which I tried to apply on an uncompressed version of
OpenLayers.

Unfortunately, it didn't work. I have load errors that aren't detected and
I need to know if there are load fails/errors.

Could you put this event in a new fix of OpenLayers, please? If it is
already there, how could I use it?

Thank you.

João
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20140528/ccb3ebcd/attachment.html>


More information about the Users mailing list