[ios] Avoid unrotating in heading or course tracking mode

Fixes #3587.
This commit is contained in:
Minh Nguyễn
2016-01-16 15:56:25 -08:00
committed by Minh Nguyễn
parent 9d13c639d1
commit ed32fa06ed

View File

@@ -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];
}