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

v10 zoom and rotation do not use correct axis #82

Closed
sbma44 opened this issue Feb 5, 2021 · 2 comments · Fixed by #109
Closed

v10 zoom and rotation do not use correct axis #82

sbma44 opened this issue Feb 5, 2021 · 2 comments · Fixed by #109
Assignees
Labels
bug 🪲 Something isn't working p1

Comments

@sbma44
Copy link
Member

sbma44 commented Feb 5, 2021

Environment

  • Android OS version: 9
  • Devices affected: replicated on Lenovo TB-8505FS
  • Maps SDK Version: v10 beta 12

Observed behavior and steps to reproduce

Same issue as reported for iOS in mapbox/mapbox-maps-ios#65 with exception of fact that panning works while two-finger gesture is in progress, which is not true on iOS.

Expected behavior

pinch to zoom and rotate center on the gesture rather than center of the map

@sbma44 sbma44 added the bug 🪲 Something isn't working label Feb 5, 2021
@tobrun tobrun added the p1 label Feb 8, 2021
@pengdev
Copy link
Member

pengdev commented Feb 12, 2021

Tried to reproduce the issue locally, the issue seems to be related to the animations plugin.
If I change https://github.com/mapbox/mapbox-maps-android/blob/main/plugin-gestures/src/main/java/com/mapbox/maps/plugin/gestures/GesturesPluginImpl.kt#L568 from easeTo to jumpTo, the issue seems to be fixed.

Since all the easeTo functions uses the same cameraAnimation options:

mapAnimationOptions {
      duration = 0
      owner = MapAnimationOwnerRegistry.GESTURES
    }

Shall we remove the dependency of AnimationsPlugin and use jumpTo instead? would this cause issue to the gestures ownership management?

cc @mapbox/maps-android @kiryldz

@pengdev pengdev self-assigned this Feb 12, 2021
@kiryldz
Copy link
Contributor

kiryldz commented Feb 15, 2021

Tried to reproduce the issue locally, the issue seems to be related to the animations plugin.
If I change https://github.com/mapbox/mapbox-maps-android/blob/main/plugin-gestures/src/main/java/com/mapbox/maps/plugin/gestures/GesturesPluginImpl.kt#L568 from easeTo to jumpTo, the issue seems to be fixed.

Since all the easeTo functions uses the same cameraAnimation options:

mapAnimationOptions {
      duration = 0
      owner = MapAnimationOwnerRegistry.GESTURES
    }

Shall we remove the dependency of AnimationsPlugin and use jumpTo instead? would this cause issue to the gestures ownership management?

cc @mapbox/maps-android @kiryldz

That was the main idea to use easeTo with zero duration to perform immediate jump but do it via animations plugin. I'll take a look at it - easeTo with duration = 0 should actually do a single jumpTo under the hood, seems to be a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working p1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants