mapbox / mapbox-navigation-ios

Turn-by-turn navigation logic and UI in Swift on iOS
https://docs.mapbox.com/ios/navigation/
Other
855 stars 299 forks source link

[Bug]: Screen keep moving while on navigation in Carplay #4616

Open santoso8118 opened 3 months ago

santoso8118 commented 3 months ago

Mapbox Navigation SDK version

2.17.0

Steps to reproduce

While in navigation at crossroads the screen keep moving to other place then focus on current location again multiple times

Expected behavior

Camera should focus and follow user current location while in navigation

Actual behavior

Camera keep moving to other location then move back to user current location multiple times

Uploading WhatsApp Video 2024-03-07 at 09.27.19.mp4…

Is this a one-time issue or a repeatable issue?

repeatable

santoso8118 commented 3 months ago

Recorded video for the issue: https://github.com/mapbox/mapbox-navigation-ios/assets/115057723/02a3916f-82f0-4ce1-9d93-3e873f9ebefc

kried commented 3 months ago

Hi @santoso8118

Could you please share with us the sample project to reproduce the issue? Do you use a real device or a simulator for testing? Do you enable route navigation emulation or use any other coordinate emulation mechanism, e.g. GPX file?

santoso8118 commented 3 months ago

@kried Kre Sorry we don't have sample project to reproduce the issue. It is reported issue from our user. They are using our app and driving on road with real device. We don't simulate it for testing or using GPX file to simulate user's location.

kried commented 3 months ago

Hi

The possible situation when the camera keeps randomly moving is when the previous navigation session was not finished and it can still pass the camera updates. Please, make sure that you call endNavigation(feedback:), stop(), or that you deinitialize the previous instances of NavigationService and NavigationViewController.

santoso8118 commented 2 months ago

@kried Thank you for your feedback ! I checked our implementation already call stop() when navigation end but we never call endNavigation(feedback:)

From the document I see that the only way to end navigation session is we need to call endNavigation(feedback:).

I will update code to call endNavigation(feedback:) when user end navigation and see.