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

Wrap camera heading - #7724

Merged
1ec5 merged 2 commits into
release-ios-v3.4.0from
1ec5-camera-wrap-7723
Jan 24, 2017
Merged

1ec5 merged 2 commits into
release-ios-v3.4.0from
1ec5-camera-wrap-7723

Conversation

@1ec5

@1ec5 1ec5 commented Jan 14, 2017 •

Copy link
Copy Markdown
Contributor

Fixed an issue causing MGLMapView’s camera’s heading to be set to a negative value, indicating an undefined heading, when the map view faces northwest. The heading is now wrapped to between zero and 360 degrees, for consistency with MGLMapView’s direction property.

Fixes #7723.

/cc @friedbunny

@1ec5 1ec5 added bug iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS navigation For the Mapbox Navigation SDK for Android or iOS or navigation use cases in general labels Jan 14, 2017
@1ec5 1ec5 added this to the ios-3.4.1 milestone Jan 14, 2017
@1ec5 1ec5 self-assigned this Jan 14, 2017
@1ec5
1ec5 requested a review from incanus January 14, 2017 18:41
@mention-bot

Copy link
Copy Markdown

@1ec5, thanks for your PR! By analyzing this pull request, we identified @incanus, @boundsj and @friedbunny to be potential reviewers.

@1ec5

1ec5 commented Jan 14, 2017

Copy link
Copy Markdown
Contributor Author

I put this PR on the v3.4.1 milestone, because it’s so close to the v3.4.0 release and we shipped this regression in v3.3.0. However, I’m open to moving it up to v3.4.0 if there’s a need for the fix sooner.

Comment thread platform/ios/uitest/MapViewTests.m Outdated
[tester.mapView twoFingerRotateAtPoint:tester.mapView.center angle:-45];

XCTAssertGreaterThanOrEqual(fabs(tester.mapView.direction - startAngle),
-20,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The absolute value of one number will always be greater than or equal to another, negative number.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 1fa4c07.

@1ec5
1ec5 force-pushed the 1ec5-camera-wrap-7723 branch from 5edbec2 to 1fa4c07 Compare January 24, 2017 03:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS navigation For the Mapbox Navigation SDK for Android or iOS or navigation use cases in general

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants