Open nenadvicentic opened 5 years ago
Sure, I could be open to an option to disable the spinner on base tiles if someone wanted to create a pull request.
I can make a pull request (in a week or two), but can you elaborate a bit how it should be done?
If option to disable the spinner reacting on layer events is true
, you skip calling this._addLayerListeners(map);
in onAdd
function? Still calling this._addMapListeners(map);
?
How would showing/hidding be activated in that case? Still with using dataloading
and dataload
events on the map
? For example map.fireEvent('dataloading')?
I have use case where I want to show spinner only during loading of application data on the map. I am not concerned with progress of tiles and other layers loading, since data on those layers is not crucial to the user.
I achieved this with a bit of hacking, using "private" methods
_showIndicator
and_hideIndicator
and unregistering event listeners immediately after control is added to the map:It would be nice to have official support for this use case.