Hi Brad, I haven't done this with OpenLayers yet, but typically in applications (especially AJAX apps) I maintain a queue of loading images requests. When a process starts (such as a layer load, I add it to the queue) when the process is finished then it gets popped off the queue. Only when the queue is empty do you killing the loading image.
HTH Cheers, Bill -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of bradleyspencer Sent: Tuesday, October 16, 2007 7:27 PM To: Christopher Schmidt; Edward Fialkowski; [email protected] Subject: Re: [OpenLayers-Users] Way to detect if layer is done loading? I am trying to implement a Loading Image as well. I have managed to use LayerLoadMonitoring example to build my own Loading thingy. See http://demo.cubewerx.com.au/layerload.html This works fine for single layers as activate the Loading Image as start of load and I kill it off once that layer has loaded. However, if there are multiple layers active and there is a time difference between loading layers, the loading image has gone after the first layer has completed loading. I'm not sure how I can modify this to kill off the Loading Image only after all layers are loaded. Can anyone help me here? Cheers, Brad Spencer http://www.cubewerx.com.au -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Christopher Schmidt Sent: Tuesday, 16 October 2007 7:15 AM To: Edward Fialkowski Cc: [email protected] Subject: Re: [OpenLayers-Users] Way to detect if layer is done loading? On Mon, Oct 15, 2007 at 03:16:14PM -0500, Edward Fialkowski wrote: > Hi List, I would really like to add a loading image to my app to show when a > layer is still being downloaded, but I'm having difficulty getting the right > javascript code. > > One option is if it's possible to know in openlayers when a WMS image is > finished downloading and added to the map. > > Has anyone ever tried anything like this? http://openlayers.org/dev/examples/layerLoadMonitoring.html Regards, -- Christopher Schmidt MetaCarta _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users _______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
