mapbox-navigation-ios icon indicating copy to clipboard operation
mapbox-navigation-ios copied to clipboard

[Bug]: Route line is missing while in navigation

Open santoso8118 opened this issue 3 months ago • 2 comments

Mapbox Navigation SDK version

Mapbox navigation 2.18.4

Steps to reproduce

We are using .gpx file to simulate user location update from 22 Bellios Lane to 9 Boon Keng Rd

  1. We start trip first time and simulate user location to destination using .gpx file
  2. When user reach to the destination we stop navigation
  3. After that we reset user location using the same .gpx file
  4. When we start the second trip to the same destination again, using same .gpx file, at this time the route line is missing in navigation

I have a question:

  1. Is there any caching data from Mapbox sdk that recorded user already reached to destination . And after that if user start the same trip to the same destination Mapbox will immediately updated user is on arrive destination ?
  2. If we have caching data like that, how can we clean it up to start the second trip normally ?

Expected behavior

When we start the second trip at step 4 the route line should be shown normally while app is in navigation

Actual behavior

Route line is missing in second trip navigate to the same location

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

repeatable

santoso8118 avatar Oct 17 '25 08:10 santoso8118

Hi @santoso8118

Thank you for your report. Could you please provide additional details, like screenshots? From what I understood, the problem is not that the route is not displayed on the second simulation, but it should be rather that the user location simulation remains at the destination from the previous navigation.

For simulation scenarios, my recommendation is to recreate MapboxNavigationProvider instance to clear the previous navigation location state.

kried avatar Nov 18 '25 12:11 kried

As for the Nav SDK v2 version, you will need to recreate MapboxNavigationService instance.

kried avatar Nov 18 '25 12:11 kried