Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update heading orientation when device orientation changes #122

Closed
1ec5 opened this issue Apr 3, 2019 · 2 comments
Closed

Update heading orientation when device orientation changes #122

1ec5 opened this issue Apr 3, 2019 · 2 comments
Labels

Comments

@1ec5
Copy link
Contributor

1ec5 commented Apr 3, 2019

When the device’s orientation changes between portrait and landscape, we need to update any CLLocationManager’s headingOrientation property to reflect the new device orientation. Otherwise, headings (and course readings?) may be off by up to 90°. The map SDK updates its location manager’s heading orientation whenever -layoutSubviews gets called on MGLMapView, since the view hierarchy is always updated on orientation changes. But this library can observe UIDeviceOrientationDidChangeNotification.

/ref mapbox/mapbox-navigation-ios#1942 (comment)
/cc @rclee

@1ec5 1ec5 added the bug label Apr 3, 2019
@1ec5
Copy link
Contributor Author

1ec5 commented Apr 3, 2019

I momentarily forgot that course is independent of the device’s heading and therefore independent of its orientation too. Meanwhile, this library doesn’t record the heading at all, so we’re good here.

@1ec5 1ec5 closed this as completed Apr 3, 2019
@rclee
Copy link
Contributor

rclee commented Apr 3, 2019

We're not collecting course at the moment either. 😄 https://github.com/mapbox/mobile-telemetry/issues/19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants