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
If the application calculates and displays a route on a preview map, but the user leaves the preview map sitting there for over 2 minutes without starting a trip, the application should ideally refresh the route to reflect current traffic conditions. The process is straightforward but not especially discoverable, so we should add an example of it.
As far as I can tell, refreshing the route would entail:
Call Directions.refreshRoute(responseIdentifier:routeIndex:fromLegAtIndex:completionHandler:) on a timer.
In the completion handler, call Route.refreshLegAttributes(from:).
Call NavigationMapView.show(_:legIndex:).
It’s only possible to refresh a single route at a time. We could chain the refresh calls to refresh all the routes in series, or we could refresh only the currently selected route, restarting the timer when selecting a different route.
/cc @mapbox/navigation-ios
The text was updated successfully, but these errors were encountered:
On the other hand, it would be even more helpful for the application to simply rerequest the routes on a timer, which would effectively implement the proactive rerouting feature during turn-by-turn navigation. After all, the user is less committed to a particular route before having begun the trip.
If the application calculates and displays a route on a preview map, but the user leaves the preview map sitting there for over 2 minutes without starting a trip, the application should ideally refresh the route to reflect current traffic conditions. The process is straightforward but not especially discoverable, so we should add an example of it.
As far as I can tell, refreshing the route would entail:
Directions.refreshRoute(responseIdentifier:routeIndex:fromLegAtIndex:completionHandler:)
on a timer.Route.refreshLegAttributes(from:)
.NavigationMapView.show(_:legIndex:)
.It’s only possible to refresh a single route at a time. We could chain the refresh calls to refresh all the routes in series, or we could refresh only the currently selected route, restarting the timer when selecting a different route.
/cc @mapbox/navigation-ios
The text was updated successfully, but these errors were encountered: