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

Follow GPS position doesn't always correctly disengage #5824

Closed
RubenKelevra opened this issue Aug 21, 2024 · 12 comments
Closed

Follow GPS position doesn't always correctly disengage #5824

RubenKelevra opened this issue Aug 21, 2024 · 12 comments
Labels
blocked blocked by another issue bug upstream result from an upstream issue

Comments

@RubenKelevra
Copy link
Contributor

I noticed that the "follow GPS position" function doesn't always disengage quickly, if the user is panning away. This leads to a "snapping" back to the GPS position, which is unexpected.

Screenshot

InShot_20240821_152823011.mp4

How to Reproduce

  • Engage GPS following
  • Pan away
  • GPS following does not turn back to black and stays engaged
  • on next GPS update the map will snap back to the GPS position

Expected Behavior
GPS following should disengage as soon as the user moves the map around.

Versions affected
Android 12
SC 59.0 Alpha 1

@Helium314
Copy link
Collaborator

The problem is here.
MapLibre calls onMoveBegin even when there was no move, so the workaround for checking whether there was an actual move is necessary to separate moves from taps. This has the side effect of not registering a move when you tap the map, hold for a while and then move.

@RubenKelevra
Copy link
Contributor Author

Okay? 🤔

Is there no way to hook something different to get the actual viewpoint updates? If so you could compare if the new center of the viewpoint is roughly the GPS position.

@Helium314
Copy link
Collaborator

I thinks this should actually be fixed on MapLibre side. onMoveBegin being called without move is very unexpected.

@westnordost
Copy link
Member

True, but they are really slow in fixing bugs. So it would be good to have a (better working) workaround until then. Has it been reported already?

@westnordost
Copy link
Member

@Helium314 do you have another idea how to workaround this issue? If not, we should just create an issue at MapLibre and close this one. (And if yes, we should implement that workaround and still create an issue at MapLibre.)

@RubenKelevra
Copy link
Contributor Author

If not, we should just create an issue at MapLibre and close this one.

I recommend keeping persistent issues open, even if not actionable. It makes sure that nobody else invests time to create a bug-report which then just gets closed as duplicate.

See #5572, #5699, #5651, #5584

@matkoniecz
Copy link
Member

well, people should anyway look also at matching closed ones before reporting

@RubenKelevra
Copy link
Contributor Author

RubenKelevra commented Aug 30, 2024

Why? Github discourages this by only searching for open issues by default and if a bug is closed its either "completed" or "won't fix":

Both don't apply to not yet fixed bugs.

Screenshot_2024-08-30-13-10-37-108-edit_org mozilla firefox

@westnordost
Copy link
Member

Reported upstream but also found a workaround that might work.

@riQQ riQQ added the upstream result from an upstream issue label Sep 1, 2024
@RubenKelevra
Copy link
Contributor Author

Will test it as soon as I can start the app again, thanks!

@mnalis
Copy link
Member

mnalis commented Sep 6, 2024

Will test it as soon as I can start the app again, thanks!

the workaround should be included in v59.0-alpha4 @RubenKelevra so feel free to test it when you have an intermezzo between breaking them 🥲

@RubenKelevra
Copy link
Contributor Author

@mnalis can confirm, workaround works like a charm in 59 alpha 4 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked blocked by another issue bug upstream result from an upstream issue
Projects
None yet
Development

No branches or pull requests

6 participants