-
-
Notifications
You must be signed in to change notification settings - Fork 146
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
[Backport release_3_7] Fixing tiles resolutions #4633
Merged
rldhont
merged 6 commits into
3liz:release_3_7
from
rldhont:backport-4627-to-release_3_7
Jul 17, 2024
Merged
[Backport release_3_7] Fixing tiles resolutions #4633
rldhont
merged 6 commits into
3liz:release_3_7
from
rldhont:backport-4627-to-release_3_7
Jul 17, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fixes 3liz#4332 Currently, if the map allows you to go beyond the min/zoom resolution of a WMTS or XYZ source, Lizmap won't display anything beyond this min/zoom resolution. OpenLayers is able to do resampling. This can be seen when you zoom in progressively. OpenLayers must be forced to use the max zoom of the grid even when the user goes beyond it. The solution is described on stackoverflow https://stackoverflow.com/questions/43538345/how-to-force-load-tiles-for-lower-resolution and is based on `TileGrid`'s `getZForResolution` method https://github.com/openlayers/openlayers/blob/main/src/ol/tilegrid/TileGrid.js#L634 ```js getZForResolution(resolution, opt_direction) { const z = linearFindNearest( this.resolutions_, resolution, opt_direction || 0, ); return clamp(z, this.minZoom, this.maxZoom); } ``` This method is based on the `this.resolutions_` list of grid resolutions. The index of the resolution closest to that in parameter is then set to the min or max zoom value. So if `this.resolutions_` contains 24 values but maxZoom is 19, then when the map is at levels 20, 21, 22, 23 and 24, the grid will limit queries to zoom 19. Funded by FM Projet
github-actions
bot
added
map viewer
sponsored development
This development has been funded
javascript
Pull requests that update Javascript code
run end2end
If the PR must run end2end tests or not
labels
Jul 17, 2024
FM Projet |
rldhont
added
run end2end
If the PR must run end2end tests or not
and removed
run end2end
If the PR must run end2end tests or not
labels
Jul 17, 2024
rldhont
changed the title
[Backport release_3_8] Fixing tiles resolutions
[Backport release_3_7] Fixing tiles resolutions
Jul 17, 2024
github-actions
bot
added
tests
unit tests and docker configuration for tests
and removed
tests
unit tests and docker configuration for tests
labels
Jul 17, 2024
* Native EPSG:3857 scales * Tiles resolutions
rldhont
force-pushed
the
backport-4627-to-release_3_7
branch
from
July 17, 2024 14:18
cad39e0
to
9dc817f
Compare
github-actions
bot
added
tests
unit tests and docker configuration for tests
and removed
tests
unit tests and docker configuration for tests
labels
Jul 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
javascript
Pull requests that update Javascript code
map viewer
run end2end
If the PR must run end2end tests or not
sponsored development
This development has been funded
tests
unit tests and docker configuration for tests
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport #4627 and #4634
Authored by: @rldhont