GIScience / ors-map-client

Openrouteservice API web SPA client using VueJS, Vuetify and Vue2Leaflet
http://maps.openrouteservice.org
Apache License 2.0
104 stars 32 forks source link

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

Open SlowMo24 opened 1 year ago

SlowMo24 commented 1 year ago

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 commented 1 year ago

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

SlowMo24 commented 1 year ago

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 commented 1 year ago

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.