From ed32fa06ed851618069126cc6717405d6710f05f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Sat, 16 Jan 2016 15:56:25 -0800 Subject: [PATCH] [ios] Avoid unrotating in heading or course tracking mode Fixes #3587. --- platform/ios/src/MGLMapView.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 96bb7bcdb..2269196c8 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]; }