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

[android][release-v4.2.0] zoomIn, zoomOut CameraUpdate disable automatically tracking mode (Follow to None) #7854

Closed
13kz opened this issue Jan 25, 2017 · 3 comments
Labels
Android Mapbox Maps SDK for Android good first issue Good for newcomers

Comments

@13kz
Copy link

13kz commented Jan 25, 2017

Platform:Android
Mapbox SDK version: Release Android v4.2.0

Expected behavior
On tracking mode follow, when user clicks on zoom buttons, the tracking should not be lost.

Actual behavior
User loose the tracking mode (follow) on zoom in or zoom out.

Instead of calling mapView.resetTrackingModesIfRequired(cameraPosition) in animateCamera runnable callback, should you not check if resetting tracking mode is required like in easeCamera method?

if (resetTrackingMode) {
    mapView.resetTrackingModesIfRequired(cameraPosition);
}
@tobrun
Copy link
Member

tobrun commented Jan 26, 2017

when user clicks on zoom buttons

@13kz are these buttons implemented by you or are we talking about the on screen buttons shown by the SDK?

Instead of calling mapView.resetTrackingModesIfRequired(cameraPosition) in animateCamera runnable callback, should you not check if resetting tracking mode is required like in easeCamera method?

I think this is a viable solution. The parameter exposed on easeCamera was added to allow for more dynamic animations (eg. navigation mode) but I'm also thinking about other solutions as setting a flag that results in not stopping tracking mode except for setTrackingMode.

@tobrun tobrun added the Android Mapbox Maps SDK for Android label Jan 26, 2017
@13kz
Copy link
Author

13kz commented Jan 26, 2017

Thanks @tobrun for the feedback. These buttons are implemented by myself. Using animateCamera from MapboxMap with the camera update and MapboxMap cancelable callback as parameters.

Adding a flag to avoid resetting tracking seems like a good idea.

@tobrun
Copy link
Member

tobrun commented Jan 26, 2017

Picking this up now as this changes public API for the 5.0.0 release.
PR in #7871.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants