'loadstart' and 'loadend' events for singular layers
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 42/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- javascript
- Domain
- frontend
Research direction
Start by tracing the existing map-level loadstart/loadend events and the WMTS source tileloadstart/tileloadend path. Define how layer-level loading boundaries should work when tiles begin loading over time, then verify the behavior with tests for singular layers and multiple layers.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
Currently, we use map.on('loadstart') and map.on('loadend') for displaying a loading spinner while the map finishes loading in. This works well, but ideally we'd like a way to know when each layer is done loading in (assuming multiple layers on the same map).
I tried using source.on('tileloadstart') and source.on('tileloadend') for some of our layers using OlSourceWMTS source, and it doesn't really do exactly what we want. The number of tiles being loaded increase over time as the layer loads in, meaning we don't know how many tiles total are going to be loaded for each layer. This also means that, once all tiles that have triggered tileloadstart for a particular layer have also triggered tileloadend, we have no way to know if that layer has further tiles to load still that just haven't triggered tileloadstart yet, or if all the tiles for that layer are done loading.
Describe the solution you'd like
Ideally, being able to use something like layer.on('loadstart') and layer.on('loadend'), the same way you can for the map as a whole. This would allow easy tracking of when each layer is done loading individually, which would allow showing much more precise loading feedback to a user.
- Dominant language
- JavaScript
- Stars
- 12.6k
- Forks
- 3.2k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 5
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openlayers/openlayers
-
feature request
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
openlayers/openlayers#17736 · 1 comment ·
Maintainers usually reply within 1 day
-
GeoJSON: a feature read with a null geometry is written with "geometry": null in its propertiesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
openlayers/openlayers#17732 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
openlayers/openlayers#17648 · 2 comments · 3 reactions ·
Maintainers usually reply within 1 day
-
feature request
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
openlayers/openlayers#17145 ·
Maintainers usually reply within 1 day
-
feature request
Difficulty 1/5 Under an hour Newbie friendliness 70/100
openlayers/openlayers#16410 ·
Maintainers usually reply within 1 day
All issues in openlayers/openlayers
Similar issues
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
coder/claudecode.nvim#588 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
digitalbazaar/http-client#60 ·
-
Selectmenu changes selection after its native select is disabled while openPossibly taken @Xapollon430 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Ruby: The link in the Blocks lesson points to an external article that isn't at that address anymoreOpen
Difficulty 1/5 Under an hour Newbie friendliness 84/100
TheOdinProject/curriculum#31529 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
topmonks/hlidac-shopu#3687 ·
Maintainers usually reply within 1 day