Skip to content

Render prediction fields in a worker, simplify loading indicator#257

Merged
m-mohr merged 1 commit into
mainfrom
predictions-layer-worker
Apr 21, 2026
Merged

Render prediction fields in a worker, simplify loading indicator#257
m-mohr merged 1 commit into
mainfrom
predictions-layer-worker

Conversation

@ahocevar
Copy link
Copy Markdown
Collaborator

This pull request moves the rendering of the global fields prediction layer to a worker.

The approach used here is basically what's done in https://openlayers.org/en/latest/examples/tiled-layer-rendering-in-offscreen-canvas.html.

In addition, the logic for the map loading indicator is simplified - OpenLayers has loadstart and loadend events on the Map for that. No need to keep track of rendered tiles.

Copy link
Copy Markdown
Collaborator

@m-mohr m-mohr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work great!

@m-mohr m-mohr merged commit f9a54e5 into main Apr 21, 2026
1 check passed
@m-mohr m-mohr deleted the predictions-layer-worker branch April 21, 2026 09:50
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.

2 participants