Skip to content

Source has changed when loading failed #16647

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

Merged
merged 1 commit into from
Feb 12, 2025
Merged

Conversation

ahocevar
Copy link
Member

The reason why the map's loadend event does not fire when a vector source failed to load (e.g. due to a 404 response) is because the map does not get to know about a failed load. The loadend event is dispatched in a postrender function, but for a failed load no layer rendering is requested, so postrender is not called.

That said, the fix is to mark the source as changed when loading failed, so the renderer goes through the same sequence as if features were added from a successful load.

Fixes #16640.

Copy link

📦 Preview the website for this branch here: https://deploy-preview-16647--ol-site.netlify.app/.

@ahocevar ahocevar merged commit bcd9adf into openlayers:main Feb 12, 2025
8 checks passed
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

Successfully merging this pull request may close these issues.

Does not fire loadend event when vector source url returns 404
2 participants