[OpenLayers-Users] Does OpenLayers provide a way to check if a layer is available?

Bart van den Eijnden bartvde at opengeo.org
Fri Oct 19 00:37:40 PDT 2012


For any layers that descend from OpenLayers.Layer.Grid there is a tileerror event which you can listen for.

Best regards,
Bart

-- 
Bart van den Eijnden
OpenGeo - http://opengeo.org
Expert service straight from the developers.



On Oct 18, 2012, at 7:55 PM, Rob Hyx <robhyx at gmail.com> wrote:

> Hello,
> 
> I have an OpenLayers map with several 'base layers', and by that I
> mean I have a custom drop down implemented that allows toggling
> between various WMS and ArcGIS layers for the base layer. Sometimes
> the default layer returns pink tiles (the server issues a 500 error).
> I want to be able to switch to the next one when this is not available
> automatically. Does OpenLayers provide a way to do this, or would I
> have to write some custom code and check whether or not I'm getting a
> 'png' back?
> 
> Thanks in advance!
> 
> -- 
> HYX
> http://hyx-music.com
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20121019/2aece8d1/attachment.html>


More information about the Users mailing list