Skip to content

Commit

Permalink
Fix: when snapUserLocationToRoute is enabled the snappedLocation is b…
Browse files Browse the repository at this point in the history
…eing used even when we aren't navigating (#386)
  • Loading branch information
bjtrounson authored Dec 9, 2024
1 parent 3d85969 commit 1a59786
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ fun NavigationMapView(

val locationEngine = remember { StaticLocationEngine() }
locationEngine.lastLocation =
if (snapUserLocationToRoute) {
if (snapUserLocationToRoute && isNavigating) {
uiState.snappedLocation?.toAndroidLocation()
} else {
uiState.location?.toAndroidLocation()
Expand Down

0 comments on commit 1a59786

Please sign in to comment.