The TileLayer and WMSTileLayer expose the n_loads prop that fires when the loading has been completed. However, there seems to be no way of firing a callback when the loading process starts.
This is useful for creating spinners that notify users that loading is in progress.
The Leaflet library documents the loading event, which is used to notify when the layer loading process starts. See example here
I wonder if there is a way in dash-leaflet to fire a callback when a TileLayer or WMSTileLayer starts loading. I have tried the alternative of using the map bounds property but sometimes, small pannings do not request new tiles.
Any ideas to get this working would be greatly appreciated.
The
TileLayer
andWMSTileLayer
expose then_loads
prop that fires when the loading has been completed. However, there seems to be no way of firing a callback when the loading process starts.This is useful for creating spinners that notify users that loading is in progress.
The Leaflet library documents the
loading
event, which is used to notify when the layer loading process starts. See example hereI wonder if there is a way in dash-leaflet to fire a callback when a
TileLayer
orWMSTileLayer
starts loading. I have tried the alternative of using the map bounds property but sometimes, small pannings do not request new tiles.Any ideas to get this working would be greatly appreciated.