-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Route Refresh #2366
Route Refresh #2366
Conversation
Discussed today with Antonio and Hossam. Not a release blocker for v1.0 marketing push. We will backport to v1.0 branch and include as part of v1.0.x |
Removed the release blocker sticker. |
224741e
to
893f57f
Compare
I expanded the scope of this PR in #2591. If approved, that PR would merge into this one and we’d be pretty close to landing the feature. |
893f57f
to
e0df11d
Compare
…tal idea about RouteProgress route refreshing.
e0df11d
to
6103287
Compare
Keep track of the route’s index in the overall route response and use it when refreshing the route. Added a route index argument to a litany of public and private methods and initializers. Explicitly merge the skeletal refreshed route into the original route.
Post a notification and inform the navigation service and navigation view controller delegates whenever the route is refreshed. On refresh, update the route line to reflect the new traffic congestion data.
I missed a couple spots when adding |
Traffic congestion segments along the route line and the estimated arrival time periodically update to reflect current conditions when using the
DirectionsProfileIdentifier.automobileAvoidingTraffic
profile. These updates correspond to the newNotification.Name.routeControllerDidRefreshRoute
notification,NavigationServiceDelegate.navigationService(_:didRefresh:)
method, andNavigationViewControllerDelegate.navigationViewController(_:didRefresh:)
method. To disable these updates, setRouteOptions.refreshingEnabled
tofalse
.The
NavigationViewController.route
andNavigationService.route
properties are now read-only. To change the route that the user is traveling along, set theNavigationViewController.indexedRoute
orNavigationService.indexedRoute
property instead, pairing the route with the index of the route in the originalRouteResponse
object.The following methods now require a route index to be passed in as an argument:
NavigationViewController(for:routeIndex:routeOptions:navigationOptions:)
NavigationViewController(route:routeIndex:routeOptions:navigationService:)
CarPlayManagerDelegate.carPlayManager(_:navigationServiceAlong:routeIndex:routeOptions:desiredSimulationMode:)
MapboxNavigationService(route:routeIndex:routeOptions:)
MapboxNavigationService(route:routeIndex:routeOptions:directions:locationSource:eventsManagerType:simulating:routerType:)
RouteProgress(route:routeIndex:options:legIndex:spokenInstructionIndex:)
RouteProgress(route:routeIndex:options:legIndex:spokenInstructionIndex:)
Router(along:routeIndex:options:directions:dataSource:)
RouteController(along:routeIndex:options:directions:dataSource:)
Resolves #2284
Work-In-Progress
So far added basic implementation for calling Route Refresh. Experimenting with
RouteProgress
to refresh it's Route contents (suggestions are welcome).Thinking about route refresh period setting to be related with better route search period