diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2016-01-16 15:56:25 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2016-01-16 15:56:25 -0800 |
commit | ed32fa06ed851618069126cc6717405d6710f05f (patch) | |
tree | 623c26cf69a0ed39196ba6855944ad4931a2ddbf /platform | |
parent | 9d13c639d13a53ac6fef622cb3c828d6fe9aa9ba (diff) | |
download | qtlocation-mapboxgl-ed32fa06ed851618069126cc6717405d6710f05f.tar.gz |
[ios] Avoid unrotating in heading or course tracking mode
Fixes #3587.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 96bb7bcdb4..2269196c87 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -3175,7 +3175,9 @@ std::chrono::steady_clock::duration MGLDurationInSeconds(float duration) [self resetNorthAnimated:NO]; } } - else if (self.direction < snapTolerance || self.direction > 360 - snapTolerance) + else if ((self.direction < snapTolerance || self.direction > 360 - snapTolerance) + && self.userTrackingMode != MGLUserTrackingModeFollowWithHeading + && self.userTrackingMode != MGLUserTrackingModeFollowWithCourse) { [self resetNorthAnimated:animated]; } |