In OpenLayers, is there an event which fires when the map starts drawing any layer, and another for when the map has finished drawing all layers?

I wish to display a "waiting" animation while any layer is still drawing.

The help file for LoadingPanel mentions something which sounds promising, but the sample doesn't work and it mentions tiles (I'd like it to work on vector layers too).

I'm looking for the equivalent of dojo.connect(map,"onUpdateEnd"... in the ArcGIS JS API:

Fires after layers that are updating their content have completed. This event is often used in combination with onUpdateStart to display a "Map is busy" or "Loading? " message as visual feedback to the end-user.

(As a workaround, I could count the layers in the map, and monitor the status of each layer using layer.events.register("loadend"... until they have all finished. Are there other options?)


1 Answer 1


A loading panel is available as an add-in and was first mentioned here. You can either use that or hack it to suit your needs; anyway imho it provides good enough functionality.

The linked example does not work so I took the liberty of assembling a working jsfiddle:


  • Thanks for that - much appreciated. I'm finding that both the loading panel and layer.events.register("loadend"... are a bit buggy and don't always register the end of drawing, but I'll explore this in a separate thread if I can't resolve it Aug 12, 2012 at 1:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.