[OpenLayers-Users] Catching WMS Exceptions

bartvde at osgis.nl bartvde at osgis.nl
Thu Oct 15 06:22:00 EDT 2009


Hi,

check out OpenLayers.Util.onImageLoadError

Best regards,
Bart

> Hi,
>
> I use GeoServer as WMS service provider. Does exist the possibility to add
> a
> listener to the OpenLayers.Layer.WMS
> object in order to catch the 'onerror' event ? I noticed that the
> 'onerror'
> event is not present in the OpenLayers.Map.
>
>
> Best regards,
>
> Tobia Di Pisa
>
> 2009/10/15 <bartvde at osgis.nl>
>
>> Hi,
>>
>> I don't think you can currently. You can use onerror of the img, but it
>> won't give you the contents.
>>
>> A way would be loading the images through AJAX, which has disadvantages
>> as
>> well (same origin policy and needs changes to OpenLayers).
>>
>> Maybe the new WMS POST layer has a facility for this, but I don't know
>> if
>> your WMS service supports POST?
>>
>>
>> http://trac.openlayers.org/browser/trunk/openlayers/lib/OpenLayers/Layer/WMS/Post.js
>>
>> Best regards,
>> Bart
>>
>> > Hi all,
>> >
>> > I have to effect the WMS requests specifying as parameter '
>> exceptions:
>> > "application/vnd.ogc.se_xml" ' insteed ' exceptions:
>> > "application/vnd.ogc.se_inimage" '.
>> > How can I catch the server response in the case that the exception is
>> > verified?
>> >
>> >
>> > Regards,
>> >
>> >       Tobia Di Pisa
>> > _______________________________________________
>> > Users mailing list
>> > Users at openlayers.org
>> > http://openlayers.org/mailman/listinfo/users
>> >
>>
>>
>>
>>
>





More information about the Users mailing list