ebrelsford / Leaflet.loading

A simple loading control for Leaflet
MIT License
143 stars 49 forks source link

Layers added that load tiles sometimes do not invoke loading indicator #16

Open ebrelsford opened 10 years ago

ebrelsford commented 10 years ago

See discussion in #15. Needs:

ebrelsford commented 10 years ago

Minimal example of the loading indicator not working.

jaslee commented 9 years ago

My workaround for this to attach Leaflet.loading's own _show/_hideIndicator functions to each tileLayer's "loading"/"load" (i.e. started/finished loading tiles) event :-

myLayer.on('loading', function(e) { loadingControl._showIndicator() }); myLayer.on('load', function(e) { loadingControl._hideIndicator() });

ebrelsford commented 9 years ago

That's a nice enough solution, we should document this.