Open grayds opened 4 years ago
As far as i understand there could be an issue when the image source is slow. What could help is to abort the old image, the same way as for the tile layer https://github.com/Leaflet/Leaflet/blob/master/src/layer/tile/TileLayer.js#L228
I have verified the current behavior. I you have a slow WMS (for example the eumetsat layer in the sample), a new url is set for the image before the old image is loaded. This will cause a cancellation of the old image request.
So this works as intended. Wouldn't the load event be the right one? https://github.com/ptv-logistics/Leaflet.NonTiledLayer/blob/master/src/NonTiledLayer.js#L429
I'll see if I can replicate the behavior; the external service behaves inconsistently.
I should say that I definitely misspoke in the OP; I meant to say "load", not "loading". It seems like the service doesn't always return whatever signal is needed for the load event to fire; their process just sort of stops quietly.
This isn't anything backbreaking; I have a bit of a workaround for what I need those events for. If the library appears to be working as intended, then I'm cool with that.
Is it possible to develop an event handler for when a WMS process ends? I don't mean the existing error or (EDITED: load) events; simply an end-of-process event. I ask because we use an external weather overlay service which will sometimes do a quiet cancellation when a subsequent request arrives before the old one completes. Specifically, fast scrollwheel zooming is the behavior that leads to this.