Currently there is no clean way to do this, but the following should
work in all browsers except IE < 9 (untested):

layer.events.register("tileloaded", this, function() {
    if (document.getElementsByClassName("olImageLoadError").length) {
        /* your error handling code here */
    }
});

Note that if you only want to change the appearance of a broken tile,
it is enough to add some css for the .olImageLoadError selector.

Andreas.

On Sat, Jan 21, 2012 at 1:45 PM, [email protected]
<[email protected]> wrote:
> Hi all,
> i'd like capture a map event when a tile is broken (404). Is ther a event to
> capture it and run my function?
> Thanks
>
> Francesco
> _______________________________________________
> Users mailing list
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to