[OpenLayers-Users] Is there a way for OL to figure out that one of the layers is pink?

Schweitzer, Peter pschweitzer at usgs.gov
Thu Oct 24 11:03:41 PDT 2013


I'm using shaded relief from The National Map as a base layer, but
today it seems that The National Map isn't serving those data, so I'm
getting the infamous pink tiles.  I can turn them off manually using a
call to layer.setVisibility(false).  But I'd prefer that the users not
have to do this themselves.  Is there any way I could write a test in
my Javascript code that would determine whether or not this layer is
really available, and simply make the layer invisible if it isn't?

http://mrdata.usgs.gov/general/map.html

Peter
-- 
Peter N. Schweitzer (U.S. Geological Survey, Reston, VA 20192)
(703) 648-6533  email: pschweitzer at usgs.gov
http://geology.usgs.gov/peter/


More information about the Users mailing list