ebrelsford / Leaflet.loading

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

Endless loading with L.TileLayer.Canvas(), #34

Closed rendrom closed 8 years ago

rendrom commented 8 years ago

If you replace the layer openStreetMapHumanitarian from twobaselayers.html to L.TileLayer.Canvas(), openStreetMapHumanitarian = new L.TileLayer.Canvas(), and when you switch on this layer from layer control, loading indicator does not stop

ebrelsford commented 8 years ago

Thanks for letting me know. Canvas layers don't fire tileload events, so I've made an exception for them here.

rendrom commented 8 years ago

Great! Thanks! It may be useful to add an exception for L.GridLayer (replace L.TileLayer.Canvas in leaflet 1)?

ebrelsford commented 8 years ago

Thanks I've tested it but that's not an issue with Leaflet 1.0--GridLayer fires the events this plugin listens to appropriately.