Replies: 1 comment 1 reply
-
I'm not sure if it's possible or not, but maybe you could try and use addProtocol to define the logic in which you return a tile and checking if the map is moving or not, adding some busy-wait kind if logic. IDK... |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all, I have a use case where I am displaying many layers of raster data in order to facilitate a good visual looping experience (making a geostationary weather satellite & radar viewer), however due to the large amount of tile requests when the user moves the map, I would like to be able to conditionally pause tile requests for all but the currently relevant layer and then resume them once the map movement is completed.
I have taken a shallow look into the library code and seen some somewhat promising indications that it might be possible, but I really am not sure where to even begin hooking into those areas of the code.
I don't want to remove the sources or set them to null - the volume of data required for this use case is such that even populating from the browser cache is a noticeable degradation of the UX. I would ideally like to just retain the tiles I have currently for the 'paused' layers, and then request new tiles once the viewport updates have completed.
I think that the "cancel tile requests on zoom" functionality is essentially what I am looking to re-create, but for panning instead.
Has anyone managed this? I recognize this is essentially an antipattern to how most people want their maps to behave.
Beta Was this translation helpful? Give feedback.
All reactions