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

Ability to cancel request in requestTransform for overzooming purposes #13258

Open
dee-cf opened this issue Aug 19, 2024 · 0 comments
Open

Ability to cancel request in requestTransform for overzooming purposes #13258

dee-cf opened this issue Aug 19, 2024 · 0 comments

Comments

@dee-cf
Copy link

dee-cf commented Aug 19, 2024

Motivation

I am trying to implement overzooming so that I don't need to load vector tile source for each zoom level but just for some.
It would be great to be able to parse zoom levels for which I need to get data from server and for which I can cancel a request.

For example, lets say my tiles extent is such that I can overzoom 3 levels. that means, if I want some data from the source to show on zoom levels 15-21, I could:

15 > load
16, 17 > cancel
18 > load
19,21 > cancel

this way I could save 4 requests per source.

Design Alternatives

The way we can do it now is to have separate layer per zoom level range each with its corresponding source:
15-17 > layer15-17 > source15
18-21 > layer18-21 > source18

alternative approach might be to be able to define an array of zoom levels (within minZoom-maxZoom range) for which source should be loaded. This would be an optional parameter on the source.

Design

The advantage of being able to cancel/skip the request based on zoom level is simplification on layers side (single layer instead of many): we keep single layer with single source and introduce stepped requests based on overzooming strategy.

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

No branches or pull requests

2 participants