Hi,
Is there some event I can listen for clientside that will inform me when the map is done rendering all its tiles? It seems to me that there should be since you use it internally to show/hide the LoadingImage.
Thanks,
Chris
Hi,
Is there some event I can listen for clientside that will inform me when the map is done rendering all its tiles? It seems to me that there should be since you use it internally to show/hide the LoadingImage.
Thanks,
Chris
Hello Chris,
OpenLayers has provides two client-side events for your requirements that are “loadstart” and “loadend” event.
“loadstart” will be triggered when layer loading starts.
“loadend” will be triggered when layer loading ends.
If you are not familiar with that, please get full detailed information about them with the link below:
dev.openlayers.org/releases/OpenLay...VENT_TYPES
If you have additional questions please feel free to let us know.
Regards,
Gary
Gary,
Thanks for the quick response.
I am aware of those two events.My understanding is that those events need to be registered on a layer by layer basis. However, when the map object loads, the application does not know how many layers are going to be loaded since it is completely dynamic based on certain user rights. I would have to find a way to know that the ‘loadend’ event is for the last layer, and as I said, I don’t know the ‘last’ layer.
Any help/suggestions are much appreciated.
Thanks,
Chris
Hello Chris,
The OnMapCreated event is fire when all layer loadend and map is ready.
var OnMapCreated = function(map){
// JavaScript code
}
Also we have a OnMapCreating event too.
var OnMapCreating = function(map){
// JavaScript code
}
Regards,
Gary
Gary,
Thanks for the guidance. It works like a charm!
Chris
Hello Chris,
You are welcome, feel free to let us know any questions.
Regards,
Gary