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

[Android] Camera position generated from LatLngBounds is off-center  #11993

Closed

Description

@danesfeder

When the MapboxMap camera isn't at tilt 0 and you try to animate to a CameraUpdate created from a LatLngBounds with CameraUpdateFactory#newLatLngBounds, the final position is not centered above the bounds.

Resetting the tilt + bearing to 0 before animating to the bounds works fine

Platform: Android 7.1.1 API 25
Mapbox SDK version: 6.1.2

This position is produced when the camera bearing is set to 0 prior to animating to the bounds - tilt remaining the same (in this example, between 35-50):

ezgif com-video-to-gif

Activity

  1. added
    Android
    on May 23, 2018
  2. added this to the android-v6.3.0 milestone on Jul 5, 2018
  3. LukasPaczos commented on Jul 5, 2018

    @LukasPaczos
    Contributor

    @danesfeder since #12290 landed, could you retest new getCameraFor... methods and check if they resolve this issue? Thanks!

  4. tobrun commented on Jul 6, 2018

    @tobrun
    Member

    I'm going ahead and call this issue resolved, please reopen if still an issue

  5. mortezahosseinee commented on Nov 28, 2018

    @mortezahosseinee

    I have exactly same issue in mapbox v 6.5.0.

  6. LukasPaczos commented on Nov 28, 2018

    @LukasPaczos
    Contributor

    @milad7111 is there a chance that your issue is related to #2259?

  7. mortezahosseinee commented on Nov 30, 2018

    @mortezahosseinee

    Thanks, it relates but not it has not any good solution.

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

    Androidbug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions