Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was 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

Description

@13kz

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);
}

Activity

  1. tobrun commented on Jan 26, 2017

    @tobrun
    Member

    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.

  2. added
    Android
    on Jan 26, 2017
  3. 13kz commented on Jan 26, 2017

    @13kz
    Author

    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.

  4. added
    good first issue
    on Jan 26, 2017
  5. tobrun commented on Jan 26, 2017

    @tobrun
    Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Androidgood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions