From 3f932cbcad6ce6b5cd7d9ebff9c95c48315be506 Mon Sep 17 00:00:00 2001 From: Bobby Sudekum Date: Tue, 17 Oct 2017 08:36:45 -0500 Subject: [PATCH] Prevent spinning when user is not moving (#718) --- MapboxCoreNavigation/RouteController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MapboxCoreNavigation/RouteController.swift b/MapboxCoreNavigation/RouteController.swift index 336808ab3fe..accee239dbb 100644 --- a/MapboxCoreNavigation/RouteController.swift +++ b/MapboxCoreNavigation/RouteController.swift @@ -325,7 +325,7 @@ open class RouteController: NSObject { var userCourse = calculatedCourseForLocationOnStep var userCoordinate = snappedCoordinate.coordinate - if location.course >= 0 || location.speed >= RouteControllerMinimumSpeedForLocationSnapping { + if location.course >= 0 && location.speed >= RouteControllerMinimumSpeedForLocationSnapping { if calculatedCourseForLocationOnStep.differenceBetween(location.course) > RouteControllerMaxManipulatedCourseAngle && location.horizontalAccuracy < 20 { userCourse = location.course