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

Correct padding management in cameraForLatLngBounds #16067

Merged
merged 2 commits into from
Dec 17, 2019

Conversation

astojilj
Copy link
Contributor

Submit external contribution: #16061.

Include padding when testing camera scale in cameraForLatLngBounds:
Repurpose LatLngBoundsToCameraWithBearingAndPitch to test scaling and camera setup, both with and without padding.
Padding test (LatLngBoundsToCameraWithExcessivePadding) is not testing scaling code path in cameraForLatLngBounds. This adds the test for it and makes the test less permissive. See mapbox/mapbox-gl-native-ios#59.

RomainQuidet and others added 2 commits December 17, 2019 15:01
Repurpose LatLngBoundsToCameraWithBearingAndPitch to test scaling and camera setup, both with and without padding.
This adds testing of path not covered in mapbox/mapbox-gl-native-ios#59.
@astojilj astojilj merged commit 2fd9d4a into master Dec 17, 2019
@astojilj astojilj deleted the astojilj-cameraForLatLngs branch December 17, 2019 14:19
@chloekraw chloekraw added this to the release-unicorn milestone Dec 18, 2019
astojilj added a commit to mapbox/mapbox-navigation-ios that referenced this pull request Jul 18, 2020
As a result of fix mapbox/mapbox-gl-native#16067, contentInsets are taken into account when calculating camera.
in iOS code, current view's contentInset is passed to calculate camera.
Simplify the approach here by passing .zero, as edgePadding in MGLMapView in cameraThatFitsShape and camera has additive character: gets appended to view's contentInset.
ChristianSteffens added a commit to ChristianSteffens/mapbox-navigation-ios that referenced this pull request Jul 24, 2020
As a result of fix mapbox/mapbox-gl-native#16067, contentInsets are taken into account when calculating camera.
in iOS code, current view's contentInset is passed to calculate camera.
Simplify the approach here by passing .zero, as edgePadding in MGLMapView in cameraThatFitsShape and camera has additive character: gets appended to view's contentInset.
ChristianSteffens added a commit to ChristianSteffens/mapbox-navigation-ios that referenced this pull request Jul 25, 2020
As a result of fix mapbox/mapbox-gl-native#16067, contentInsets are taken into account when calculating camera.
in iOS code, current view's contentInset is passed to calculate camera.
Simplify the approach here by passing .zero, as edgePadding in MGLMapView in cameraThatFitsShape and camera has additive character: gets appended to view's contentInset.

# Conflicts:
#	MapboxNavigation/RouteMapViewController.swift
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants