[OpenLayers-Users] Tile Rendering start-stop
Ricardo Bayley
ricardo.bayley at gmail.com
Mon Apr 9 19:12:26 EDT 2012
Thanks Greg, works perfect !
2012/4/9 Greg Allensworth <gregor at greeninfo.org>
> 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.
>
>
> function loadingStart(layer) {
> document.getElementById('**loading').style.display = 'inline';
> }
>
> function loadingStop(layer) {
> document.getElementById('**loading').style.display = 'none';
> }
>
> wmslayer.events.register('**loadstart', wmslayer, loadingStart );
> wmslayer.events.register('**loadend', wmslayer, loadingStop );
>
>
> 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.
>
> --
> Greg Allensworth, Web GIS Developer
> BS A+ Network+ Security+ Linux+ Server+
> GreenInfo Network - Information and Mapping in the Public Interest
> 564 Market Street, Suite 510 San Francisco CA 94104
> PH: 415-979-0343 x302 FX: 415-979-0371 email: gregor at greeninfo.org
> Web: www.GreenInfo.org www.MapsPortal.org
>
> Subscribe to MapLines, our e-newsletter, at www.GreenInfo.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120409/3b94e015/attachment.html
More information about the Users
mailing list