diff options
author | Jason Wray <jason@kulturny.com> | 2015-05-14 13:13:24 -0700 |
---|---|---|
committer | Jason Wray <jason@kulturny.com> | 2015-05-14 13:13:24 -0700 |
commit | 03a129176c0afe12b99d574883c988542271bb10 (patch) | |
tree | 4c8152405459b464f56043b089b3c786fe39e44f /platform/ios | |
parent | 7d4f12434e393558344d053dc5809ce586d3fbbd (diff) | |
download | qtlocation-mapboxgl-03a129176c0afe12b99d574883c988542271bb10.tar.gz |
Rotate compass on device orientation changes
Diffstat (limited to 'platform/ios')
-rw-r--r-- | platform/ios/MGLMapView.mm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/platform/ios/MGLMapView.mm b/platform/ios/MGLMapView.mm index 586ceb20f6..ff31ec9e1a 100644 --- a/platform/ios/MGLMapView.mm +++ b/platform/ios/MGLMapView.mm @@ -642,6 +642,12 @@ std::chrono::steady_clock::duration secondsAsDuration(float duration) { [self.attributionSheet dismissWithClickedButtonIndex:self.attributionSheet.cancelButtonIndex animated:YES]; } + + if (self.compass.alpha) + { + [self updateHeadingForDeviceOrientation]; + [self updateCompass]; + } } #pragma mark - Life Cycle - |