[OpenLayers-Users] Dealing with dead layers

Erik Uzureau erik.uzureau at metacarta.com
Thu Oct 18 18:16:08 EDT 2007


I think Jeff brings up a good point. We should probably add this to the FAQ
and or look into adding a better feedback mechanism to notify the
user. The pink
tile is fine and good for developers, but on a live site, it really
isn't the best
answer.

e

On 10/18/07, Christopher Schmidt <crschmidt at metacarta.com> wrote:
> On Thu, Oct 18, 2007 at 04:34:15PM -0400, Jeff Yutzler wrote:
> > As of this writing, the NASA Global Mosaic layer (for example, the
> > second layer in http://www.openlayers.org/dev/examples/example.html) is
> > down.  These things happen from time to time for whatever reason.  The
> > problem we have is the behavior of OpenLayers.  The typical OpenLayers
> > response is to display a pink tile with the
> > browser's "broken link" icon in the corner.  Users simply do not
> > appreciate this response.  It does not tell them what they need to know
> > (that a layer is dead), does not suggest a potential solution (of
> > turning off the dead layer), and worst of all, it covers up other
> > potentially useful layers.  Does anyone have a more gracious strategy
> > for dealing with this situation?
>
> The OpenLayers.Util.onImageLoadError function is designed to be
> overridden. The OpenLayers default behavior is just that. If you just
> want to have images not show up, you can override the function, and
> change the this.style.display = ""; to not be there -- then you'll not
> see the tiles, as they'll stay hidden.
>
> OpenLayers.Util.onImageLoadErrorColor is also designed to be overridden
> -- setting it to '' will cause the 'pink' to go away.
>
> Regards,
> --
> Christopher Schmidt
> MetaCarta
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



More information about the Users mailing list