I know there is a loadstart and loadend event for each layer. I&#39;m certain there is a more elegant solution that this, but you could create a dynamic list yourself. Maybe something like this? <div><br></div><div><div><br>
</div><div>//add eventListeners to your layers like this:</div><div>var OSMLayer = new OpenLayers.Layer.OSM(&quot;OpenStreetMap&quot;,&quot;<a href="http://tile.openstreetmap.org/${z}/${x}/${y}.png">http://tile.openstreetmap.org/${z}/${x}/${y}.png</a>&quot;,{eventListeners: {&quot;loadstart&quot;: layerLoadStart,&quot;loadend&quot;: layerLoadEnd}})</div>
<div><br></div><div><br></div><div>//create an object with your layers</div><div>var layers=new Object</div><div>function layerLoadStart(e){</div><div><br></div><div>//using the id of the layer, mark it as &#39;started&#39;</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>layers[<a href="http://e.object.id">e.object.id</a>]=&quot;started&quot;</div><div>}</div><div>function layerLoadEnd(e){</div><div><br></div><div>//when it finishes, mark it as &#39;loaded&#39;</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>layers[<a href="http://e.object.id">e.object.id</a>]=&quot;loaded&quot;</div><div><br></div><div>}</div></div><div><br><div class="gmail_quote">On Wed, Apr 18, 2012 at 3:23 AM, Tobias Reinicke <span dir="ltr">&lt;<a href="mailto:ramotswa@gmail.com">ramotswa@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello All,<br>
<br>
I might have missed where this has been written, but is there not a<br>
&quot;loadend&quot; event for the entire map (rather than on a layer basis?). If<br>
not, what is the best way to check that all layers on a map have<br>
finished loading? I know there was some work done on the Loading Panel<br>
add-in, but as far as I can tell this iterates through all layers and<br>
registers loadend events on them.<br>
<br>
Any help would be be much appreciated.<br>
<br>
Regards,<br>
<br>
Toby<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
</blockquote></div><br></div>