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

Calculating camera's LatLng for bounds without map padding #11410

Merged
merged 1 commit into from
Mar 8, 2018

Conversation

LukasPaczos
Copy link
Member

@LukasPaczos LukasPaczos commented Mar 7, 2018

Closes #11340.

When calculating camera's LatLng for bounds we were taking into account both map padding and additional bounds padding. Afterward, when moving the camera with any of #easeTo, #jumpTo, #flyTo we were applying map's padding once again resulting in the incorrect camera position.

The solution is to calculate initial LatLng of the new camera position with only additional padding, the one passed with bounds.

/cc @asheemmamoowala

@LukasPaczos LukasPaczos added the Android Mapbox Maps SDK for Android label Mar 7, 2018
@LukasPaczos LukasPaczos added this to the android-v6.0.0 milestone Mar 7, 2018
@LukasPaczos LukasPaczos requested a review from tobrun March 7, 2018 17:48
Copy link
Member

@tobrun tobrun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great catch

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

Successfully merging this pull request may close these issues.

None yet

2 participants