Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event handler for end of process #31

Open
grayds opened this issue Oct 1, 2020 · 3 comments
Open

Event handler for end of process #31

grayds opened this issue Oct 1, 2020 · 3 comments

Comments

@grayds
Copy link

grayds commented Oct 1, 2020

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.

@oliverheilig
Copy link
Member

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

@oliverheilig
Copy link
Member

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

@grayds
Copy link
Author

grayds commented Oct 5, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants