You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On our driver app, we're using two separate routes for the driver in a navigation session. The driver uses a route to go from his current location to the customer's pickup location, then we swap out the route to go from Pickup location to the destination.
For testing purposes, we're using the SimulatedLocationManager, which works well until we arrive at the pickup location. Once we arrive, I want to stop the simulation, switch routes, and continue moving once the driver selects "Start Trip".
This worked on the previous version before NavigationService was implemented, but now it no longer starts moving again once the NavigationService has been replaced.
I did manage to switch only the route in the NavigationViewController, but switching the route doesn't reset the distanceTraveled, so the driver jumps forward the distance previously travelled on the old route. This fix also doesn't stop moving when stopUpdatingLocation() is called either.
Last fix I applied appears to have the NavigationService continue moving, but the map doesn't seems disconnected and no longer updates (I heard the voice commands come through and my delegate triggered didArriveAtWaypoint).
Is there a way for the NavigationView's NavigationService to receive a route, stop moving, change routes, and then continue moving on the new route?
The text was updated successfully, but these errors were encountered:
@KaterGreg We're still investigating the root cause of what you're seeing here, but in terms of a workaround, can you try the following after setting navigationService.router.route = <new>?
if navigationService.simulationMode == .always, let simulator = navigationService.locationManager as? SimulatedLocationManager {
simulator.route = <new route>
}
If that doesn't have the desired effect you may need to call .navigationService.start() after setting the simulated location manager route (which is detailed above). Let me know if that works!
Mapbox Navigation SDK version:
Mapbox-iOS-SDK (4.6.0)
MapboxCoreNavigation (0.26.0):
MapboxDirections.swift (0.25.2):
MapboxMobileEvents (0.6.0)
MapboxNavigation (0.26.0):
MapboxNavigationNative (3.4.11)
On our driver app, we're using two separate routes for the driver in a navigation session. The driver uses a route to go from his current location to the customer's pickup location, then we swap out the route to go from Pickup location to the destination.
For testing purposes, we're using the SimulatedLocationManager, which works well until we arrive at the pickup location. Once we arrive, I want to stop the simulation, switch routes, and continue moving once the driver selects "Start Trip".
This worked on the previous version before NavigationService was implemented, but now it no longer starts moving again once the NavigationService has been replaced.
I did manage to switch only the route in the NavigationViewController, but switching the route doesn't reset the distanceTraveled, so the driver jumps forward the distance previously travelled on the old route. This fix also doesn't stop moving when stopUpdatingLocation() is called either.
Last fix I applied appears to have the NavigationService continue moving, but the map doesn't seems disconnected and no longer updates (I heard the voice commands come through and my delegate triggered didArriveAtWaypoint).
Is there a way for the NavigationView's NavigationService to receive a route, stop moving, change routes, and then continue moving on the new route?
The text was updated successfully, but these errors were encountered: