<font>Thanks Greg, works perfect !<br></font><br><div class="gmail_quote">2012/4/9 Greg Allensworth <span dir="ltr"><<a href="mailto:gregor@greeninfo.org">gregor@greeninfo.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The 'loadstart' and 'loadend' events, for WMS layers anyway, indicate when all tiles have finished loading. We use this to make a little "loading..." spinner for the WMS layers, it works great.<br>
<br>
<br>
function loadingStart(layer) {<br>
document.getElementById('<u></u>loading').style.display = 'inline';<br>
}<br>
<br>
function loadingStop(layer) {<br>
document.getElementById('<u></u>loading').style.display = 'none';<br>
}<br>
<br>
wmslayer.events.register('<u></u>loadstart', wmslayer, loadingStart );<br>
wmslayer.events.register('<u></u>loadend', wmslayer, loadingStop );<br>
<br>
<br>
Since the 1 param sent to the callback ("layer" above) is the WMS layer, you can fetch the layer's ID or name, and do something a little more sophisticated with getElementById() such as fetching a specific <IMG> element, so each layer can have its own loading spinner.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Greg Allensworth, Web GIS Developer<br>
BS A+ Network+ Security+ Linux+ Server+<br>
GreenInfo Network - Information and Mapping in the Public Interest<br>
564 Market Street, Suite 510 San Francisco CA 94104<br>
PH: 415-979-0343 x302 FX: 415-979-0371 email: <a href="mailto:gregor@greeninfo.org" target="_blank">gregor@greeninfo.org</a><br>
Web: <a href="http://www.GreenInfo.org" target="_blank">www.GreenInfo.org</a> <a href="http://www.MapsPortal.org" target="_blank">www.MapsPortal.org</a><br>
<br>
Subscribe to MapLines, our e-newsletter, at <a href="http://www.GreenInfo.org" target="_blank">www.GreenInfo.org</a><br>
</font></span></blockquote></div><br>