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

Camera animations plugin doesn't work properly with multiple mapView instances. #63

Closed
pengdev opened this issue Feb 1, 2021 · 0 comments · Fixed by #70
Closed

Camera animations plugin doesn't work properly with multiple mapView instances. #63

pengdev opened this issue Feb 1, 2021 · 0 comments · Fixed by #70
Assignees
Labels
bug 🪲 Something isn't working

Comments

@pengdev
Copy link
Member

pengdev commented Feb 1, 2021

Environment

  • Android OS version: 10
  • Devices affected: OnePlus 7 Pro
  • Maps SDK Version: v10.0.0-beta.12

Observed behavior and steps to reproduce

When the application uses multiple MapViews, the high level animation APIs like easeTo, flyTo,pitchBy etc. will not work properly for all the MapViews. These camera animations will only be applied to the last created MapView.

Expected behavior

The high level animation APIs should work property for every MapView created in the application.

Notes / preliminary analysis

Currently in the camera animation plugin, the high level animation APIs, such as easeTo, flyTo,pitchBy etc, are extension functions of the MapboxMap, but they are not bound to the specific MapboxMap instance. These extension functions use the WeakReference of the animations plugin inside the CameraAnimationsPluginImpl's companion object. As a result, animation plugin created together with the new MapView will override the old weak reference.

Additional links and references

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

Successfully merging a pull request may close this issue.

2 participants