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

Phil Scadden p.scadden at gns.cri.nz
Tue Nov 27 12:59:58 PST 2012


is the 500 error persistent? (which would allow a change in your layer 
list).
You can detect an issue with:
             layer.events.register("tileerror",layer,function(evt){
                  *your code*
}
but quite what you do in such a case is more interesting. Possibilities 
- add both layers to map but make on invisible. On error, switch 
visibility and return a transparent tile
               evt.tile.setImgSrc("images/empty.png");
               return false;
Good luck!

Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.



More information about the Users mailing list