andreynovikov / trekarta

Simple, responsive map for your trek. You decide how to journey today, not the application!
https://trekarta.info
GNU General Public License v3.0
175 stars 25 forks source link

Zooming changes location #69

Closed alex3s closed 4 years ago

alex3s commented 5 years ago

When zooming out using the on-screen buttons, the geographical location moves more than one screen to north west. Conversely, when zooming in it moves to south east. Tested on Android 7.0.

hungerburg commented 5 years ago

Affects me too - I think this only happens, when there is a GPS lock on. Would you reopen?

alex3s commented 5 years ago

Do you have the latest version, marked January 2019? Reopened just in case...

hungerburg commented 5 years ago

No :) I have version 2019.07 - I had 2019.01 - both behave the same - zooming, when a GPS position is available, shifts center of the map - this never happens, when no GPS position is used.

hungerburg commented 4 years ago

Finally came around to dig into this some more - I guess, this will be low hanging fruit! For reference - this only happens with a GPS position drawn outside of the view. Below two animations:

  1. The GPS position is in view, it will remain on the same spot of the viewport
  2. The GPS position is out of view, something complex happens ;)

       Zoom-OK                       Zoom-BUG

Easy solution: if GPS position is not in viewport (i.e. blurred), use crosshair as centre for the zoom, just like if there was no GPS position at all.