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

Zooming (via mousewheel and ±-buttons) and panning (via arrows) does not update URL #374

Open
SlowMo24 opened this issue Jun 21, 2023 · 3 comments

Comments

@SlowMo24
Copy link

SlowMo24 commented Jun 21, 2023

When switching from the base map layer from OpenStreetMap view to Satellite Imagery view, the map sometimes jumps to a different, previously visited location. It potentially reads this info from the cookies?

To reproduce:

  1. zoom to a location 1
  2. pan to a new location 2
  3. switch to Satellite Imagery -> you will see the aerial view of location 1 but with zoom level of location 2

Edit: Remove example links due to copy pasta error

@koebi
Copy link
Collaborator

koebi commented Jun 21, 2023

I cannot reproduce this issue - could you maybe describe a different way to reproduce this issue?

@SlowMo24
Copy link
Author

did you click on the links? they had a copy pasta error. I have tested it in an incognito Firefox window with no plugins activated. In fact it does not always jump to location one but sometimes to the default location, yet preserving zoom level (which results in this view:
Bildschirmfoto vom 2023-06-21 16-04-15

@koebi koebi changed the title Map does random jump when switching from map view to aerial view Zooming (via mousewheel and ±-buttons) and panning (via arrows) does not update URL Jun 22, 2023
@koebi
Copy link
Collaborator

koebi commented Jun 22, 2023

The issue here only comes up if no panning by mouse happens before switching the layer.

This seems to be due to the URL (which has center point and Zoom level) not updating when zooming, but only when panning via dragging with the mouse.

The zoom level will be changed according to the zoom, so when changing the layers, it will reset to the url in the coordinates, thus keeping zoom and changing position.

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

No branches or pull requests

2 participants