Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Use animators for gestures and camera animations #8175

Closed
1ec5 opened this issue Feb 22, 2017 · 4 comments
Closed

Use animators for gestures and camera animations #8175

1ec5 opened this issue Feb 22, 2017 · 4 comments
Labels
Android Mapbox Maps SDK for Android navigation For the Mapbox Navigation SDK for Android or iOS or navigation use cases in general refactor

Comments

@1ec5
Copy link
Contributor

1ec5 commented Feb 22, 2017

The Android SDK should use animators to drive camera transitions in response to gestures and calls to methods like animateTo(). We should move off mbgl::AnimationOptions and use the mbgl::Transform methods only for incremental transform changes on each frame of the animation.

A key benefit is that the Android SDK will be able to implement concurrent animations (#3625) without us having to design an API around tweening, spring solving, or the like.

@tobrun started doing this as part of #8031. Perhaps there’s also prior art in the Qt SDK, where we’ve always relied on Qt animation APIs instead of mbgl’s.

/cc @zugaldia @ivovandongen @bsudekum

@1ec5 1ec5 added Android Mapbox Maps SDK for Android navigation For the Mapbox Navigation SDK for Android or iOS or navigation use cases in general refactor labels Feb 22, 2017
@1ec5
Copy link
Contributor Author

1ec5 commented Aug 23, 2017

#9808 (comment) demonstrates an implementation of animator-driven camera animations. 😍

@tobrun
Copy link
Member

tobrun commented Aug 23, 2017

#9808 (comment) demonstrates an implementation of animator-driven camera animations. 😍

WIP code for that in https://github.com/mapbox/mapbox-gl-native/tree/tvn-android-animations

@tobrun
Copy link
Member

tobrun commented Oct 4, 2017

The base API for this has landed in #10001, though we still need to hook our gestures and other animations into it. Reopening.

@tobrun
Copy link
Member

tobrun commented Mar 9, 2018

To clarify that why this was closed:

  • gesture animators have landed as part of the gesture rework from @LukasPaczos
  • camera animators are supported though need to be self written by end users and hooked up to CameraUpdateFactory#moveCamera. We will keep using the core animations mainly to allow prefetching tiles for doing flyTo at some point.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android navigation For the Mapbox Navigation SDK for Android or iOS or navigation use cases in general refactor
Projects
None yet
Development

No branches or pull requests

2 participants