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

Zoom animation interrupts/bounces back #5860

Open
pkoby opened this issue Aug 30, 2024 · 7 comments
Open

Zoom animation interrupts/bounces back #5860

pkoby opened this issue Aug 30, 2024 · 7 comments
Labels
blocked blocked by another issue bug upstream result from an upstream issue

Comments

@pkoby
Copy link

pkoby commented Aug 30, 2024

Sorry to keep adding bug reports. This is the last one for today, I promise! Thank you so much for all your work!

Sometimes when tapping the zoom buttons, the map doesn't zoom the whole amount its supposed to, and even bounces back a bit.

zoombounce.mp4

How to Reproduce

Tap the zoom buttons. Sometimes it seems to get interrupted, but it's not clear what is causing this. Might be because I have a slow older phone.

Expected Behavior

Smooth zoom with a consistent amount, no bouncing.

Versions affected

v59.0-alpha2

@pkoby pkoby added the bug label Aug 30, 2024
@Helium314
Copy link
Collaborator

Possibly it's because the zoom happens at the same time as your position is updated.

@pkoby
Copy link
Author

pkoby commented Aug 30, 2024

I tried to determine that, but I wasn't able to verify a correlation with the naked eye. This clip shows two bounces back to back, but it's often fine even while it seems position is moving.

@Helium314
Copy link
Collaborator

Does it also happen when the camera does not automatically follow your position?

@pkoby
Copy link
Author

pkoby commented Aug 30, 2024

No, it doesn't seem to. So it does seem to be related to position. It doesn't happen very consistently, so it's hard to tell if it's related to distance traveled or something.

@westnordost
Copy link
Member

Hmm, I think this is simply a limitation on the current MapLibre camera API. It is not made for allowing parallel camera animations (e.g. zooming in, then while zooming in move camera to different position but continue zooming in). Each call to animate camera to a new state overwrites the last.
For tangram-es I remember I wrote a complicated wrapper with logic to workaround this limitation. I don't really want to do this for MapLibre as

  • MapLibre is maintained, so there is a chance that they implement something like that (though unlikely)
  • the tangram-es implementation was causing other problems left and right. I think one problem that caused odd behavior remained unsolved forever (pressing zoom-in button while zooming in to quest would make ALL following animations finish immediately)
  • believe it or not, the current MapLibre API is but a stepping stone towards another big rewrite on the MapLibre stuff, using yet another (TBD - compose based) API. So, this is why I don't want to put a lot of effort into finding solutions for small convenience issues in this API

@pkoby
Copy link
Author

pkoby commented Aug 31, 2024

Understandable. I know there will be growing pains with this huge switch to MapLibre, and I'm just happy to have such a good app continue to grow. I also wasn't sure how many of these bugs I submitted today were map-related vs SC-related.

@westnordost
Copy link
Member

Reported upstream (as a bug, but maybe it is rather a feature request), but not closing yet because maybe we can find a reasonably cheap to implement workaround.

@westnordost westnordost added the blocked blocked by another issue label Aug 31, 2024
@westnordost westnordost added the upstream result from an upstream issue label Nov 14, 2024
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

3 participants