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

[ios] Fix wrong coordinates bounds when setting direction. #13761

Merged
merged 2 commits into from
Jan 23, 2019

Conversation

fabian-guerra
Copy link
Contributor

Fixes #12075

@fabian-guerra fabian-guerra added the iOS Mapbox Maps SDK for iOS label Jan 19, 2019
@fabian-guerra fabian-guerra added this to the release-java milestone Jan 19, 2019
@fabian-guerra fabian-guerra self-assigned this Jan 19, 2019
@fabian-guerra fabian-guerra requested review from friedbunny, julianrex and a team January 19, 2019 00:58
@fabian-guerra fabian-guerra added the needs changelog Indicates PR needs a changelog entry prior to merging. label Jan 19, 2019
@fabian-guerra fabian-guerra removed the needs changelog Indicates PR needs a changelog entry prior to merging. label Jan 22, 2019
@@ -3324,12 +3324,10 @@ - (void)_setVisibleCoordinates:(const CLLocationCoordinate2D *)coordinates count
{
latLngs.push_back({coordinates[i].latitude, coordinates[i].longitude});
}

CLLocationDirection cameraDirection = direction >= 0 ? direction : 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

What you have now is probably more readable, but something like fmaxf(direction, 0) would also work.

@@ -3326,12 +3326,10 @@ - (void)_setVisibleCoordinates:(const CLLocationCoordinate2D *)coordinates count
{
latLngs.push_back({coordinates[i].latitude, coordinates[i].longitude});
}

CLLocationDirection cameraDirection = direction >= 0 ? direction : 0;
Copy link
Contributor

@1ec5 1ec5 May 2, 2019

Choose a reason for hiding this comment

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

This change is inconsistent with the meaning of negative direction elsewhere in the SDK. Negative values should correspond to self.direction: #14574.

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

Successfully merging this pull request may close these issues.

3 participants