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

[darwin] Fix direction wrapping #14082

Merged
merged 3 commits into from
Mar 12, 2019

Conversation

friedbunny
Copy link
Contributor

Fixes #14073 by re-adding the 0-to-360° wrapping for MGLMapView.direction that was removed in #14017. Without this wrapping, we’d get ±180° from core, which results in invalid CLLocationDirection for the negative half of the rotational spectrum.

This is a two line fix that adds a variety of tests to confirm that the iOS rotation gesture and compass rotation are correct.

/cc @brunoabinader @1ec5

@friedbunny friedbunny added bug iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS release blocker Blocks the next final release labels Mar 12, 2019
@friedbunny friedbunny added this to the release-l milestone Mar 12, 2019
@friedbunny friedbunny self-assigned this Mar 12, 2019
@friedbunny friedbunny requested review from brunoabinader, 1ec5 and a team March 12, 2019 02:31
Copy link
Member

@brunoabinader brunoabinader left a comment

Choose a reason for hiding this comment

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

Thanks for fixing that @friedbunny 🙇‍♂️

include/mbgl/map/camera.hpp Outdated Show resolved Hide resolved
@friedbunny friedbunny merged commit fb1b601 into master Mar 12, 2019
@friedbunny friedbunny deleted the friedbunny-fixes-ios-direction-wrapping branch March 12, 2019 21:50
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 release blocker Blocks the next final release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clockwise map rotation gesture is broken after core camera refactor
3 participants