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

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

Closed
danesfeder opened this issue May 23, 2018 · 5 comments
Closed

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

danesfeder opened this issue May 23, 2018 · 5 comments
Labels
Android Mapbox Maps SDK for Android bug

Comments

@danesfeder
Copy link
Contributor

danesfeder commented May 23, 2018

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

@LukasPaczos
Copy link
Contributor

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

@tobrun
Copy link
Member

tobrun commented Jul 6, 2018

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

@mortezahosseinee
Copy link

I have exactly same issue in mapbox v 6.5.0.

@LukasPaczos
Copy link
Contributor

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

@mortezahosseinee
Copy link

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

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

No branches or pull requests

4 participants