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

map.view.constrainResolution to false by default #11544

Closed
wants to merge 1 commit into from

Conversation

ger-benjamin
Copy link
Member

In vars, .gmfOptions.map.view.contrainResolution should be falsy by default. Because if "true", Openlayers makes the map looking "bumpy" on zoom in/out.

This is looks like an issue, especially on the default desktop.
Eventually, we could add constrainResolution: True on the desktop_alt.

See also issue opened in: camptocamp/GeoMapFish#92

Change come from 0819c18#diff-25ddc46a3475e6781818af028a3ee89287e30737c656dcbcd85c0be7a36e3fd6L46

In vars.yaml, <interface>.gmfOptions.map.view.contrainResolution should be
falsy by default. Because if "true", Openlayers makes the map looking
"bumpy" on zoom in/out.
@ger-benjamin ger-benjamin changed the title map.view.contrainResolution to false by default map.view.constrainResolution to false by default Nov 25, 2024
@@ -81,7 +81,7 @@ vars:
maxTilesLoading: 128
view:
<<: *view
constrainResolution: True
constrainResolution: False
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a small comment in this file to explain why "False" is better?
So we don't make the mistake again of changing this setting?

Copy link
Member Author

@ger-benjamin ger-benjamin Nov 25, 2024

Choose a reason for hiding this comment

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

It's not better, just... different. It's a pure Openlayers feature.
Well, I documented the commit, and the PR, + two issues and one jira ticket, that's already something.
But we could add this documentation here, or in ngeo directly too https://camptocamp.github.io/ngeo/master/apidoc/types/srcapi_store_config.View.html#__type.constrainResolution or eventually here:
https://camptocamp.github.io/c2cgeoportal/master/integrator/ngeo.html#view

@ochriste
Copy link
Member

ochriste commented Nov 25, 2024

as a reminder:

constrainResolution | boolean (defaults to false) | If true, the view will always animate to the closest zoom level after an interaction; false means intermediary zoom levels are allowed.

so it may have some side effects when not wanting intermediary zoom levels but I dont remember exactly

@sbrunner
Copy link
Member

sbrunner commented Nov 25, 2024

I suspect that with change the map becomes a little blurry, it's not what we want...

Edit: with WMTS layers

@ger-benjamin
Copy link
Member Author

I'll dig deeper, that's probably not the only and best solution.

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

Successfully merging this pull request may close these issues.

4 participants