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

Smooth transition between zoom levels #92

Closed
AmandaWetter opened this issue Nov 5, 2024 · 4 comments
Closed

Smooth transition between zoom levels #92

AmandaWetter opened this issue Nov 5, 2024 · 4 comments
Assignees
Labels
New This Issue wasn't analyse/discussed yet

Comments

@AmandaWetter
Copy link

Who requested this new feature?

Amanda Wetter, Kanton Schwyz, Amt für Geoinformation

Is your feature request related to a problem?

Yes
When quickly zooming into the map (especially with the mouse), the map appears to re-center itself. This results in a sudden movement along the X and Y axes. Due to the re-centering, the point you want to zoom in on shifts.

Describe the solution you'd like

The abrupt re-centering should be minimized. The point you want to zoom in on should not shift.

Additional information or points to watch out for

@AmandaWetter AmandaWetter added the New This Issue wasn't analyse/discussed yet label Nov 5, 2024
@ger-benjamin ger-benjamin self-assigned this Nov 25, 2024
@ger-benjamin
Copy link
Member

Hi @AmandaWetter ,

I've found the issue and have open a PR in your repository. Could you please test it ?

The issue looks coming from the vars.yaml in <interface>/constants/gmfOptions/view the constrainResolution variable is now set to true by default (you can modify it, or/and check your update_paths). Which in my own opinion should be not the case. We can see that the zoom is done, and then Openlayers constraint the resolution to the defined value, which produce this little "jump".
And that's why we have it on the GMF demo desktop interface, but not on the desktop_alt one.

@maltaesousa
Copy link
Collaborator

Hi @ger-benjamin
Thanks for your help. We are also interested in this issue at SITN because we use constrainResolution and we need them.

It looks like this option hides the problem but it's not the cause of it. We have an example of plain OpenLayers here with constrained resolutions that does not behave the same:

https://sitn.ne.ch/services/docs/examples/wmts-plain

Here's a video showing the above example and then the same on GMF with the map glitching:

Video.mp4

@ger-benjamin
Copy link
Member

Thanks for your contribution @maltaesousa ,
That allowed me to understand deeper the issue.

I'm (nearly) sure now that the real issue come from https://github.com/camptocamp/ngeo/blob/2.9/src/controllers/AbstractAppController.js#L134-L136

I'll find a way to fix it.

@ger-benjamin
Copy link
Member

This will fix this issue camptocamp/ngeo#9541 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New This Issue wasn't analyse/discussed yet
Projects
None yet
Development

No branches or pull requests

3 participants