Hi Christopher, thanks for the quick reply and the valuable infos !!
Regards, Marco ----- Original Message ----- Da : Christopher Schmidt <[email protected]> A : Marco Ferretti <[email protected]> Cc: users <[email protected]> Oggetto : Re: [OpenLayers-Users] customizing on error behaviour Data : Fri, 17 Apr 2009 07:40:43 -0400 > On Fri, Apr 17, 2009 at 11:37:12AM +0200, Marco Ferretti > > wrote: Hi all, > > > > I need to customize my application in order to be able > > to react to a communication error with the WMS server. > > > > I have been surfing around the OpenLayers code but could > > not understand which ( if any ) entry point I have > > available in order to catch when OpenLayers recognizes a > > com. error with the server . > > > > Let me be a little clearer : when OpenLayers sends the > > pink tile it recognizes that there is an error; what I > > would like, here, is a way to get a callback to my code > > by "extending" an OpenLayers default function. I saw > > that in Util.js the function > > OpenLayers.Util.onImageLoadError does the do the trick > > by setting the background color. Is there a way to get > > notified somehow that the function has set the > > background as a consequence of detecting an error > loading the tile ? > > You can override OpenLayers.Util.onImageLoadError: > > OpenLayers.Util.onImageLoadError = function() { > alert(this.src + ' is broken!'); > } > > This is a brute force technique, but we don't have > anything btter atm, afaik. > > > > Obviously I can modify the Util.js lib ... but I would > > like to create a wrapper so that I will be "update" safe > > ( unless you do some major rework on that function ) ; > > can you please point me somewhere ? > > The above should be safe; we support it, insofar as we > have encouraged many people to use it and I would mention > it in release notes if it needed to change for some reason > , but it never has so I consider that unlikely in any > case. > > > > TIA > > > > Marco > > _______________________________________________ > > Users mailing list > > [email protected] > > http://openlayers.org/mailman/listinfo/users > > -- > Christopher Schmidt > MetaCarta _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
