Description
Router implementations store both an IndexedRouteResponse (that is, a RouteResponse plus a route index) and a RouteProgress (that is, a Route plus a leg index etc.) side by side. As a result, they effectively hold two parallel copies of the current Route that can get out of sync. For example, after a reroute, RouteController sets the routeProgress
property but neglects to update the indexedRouteResponse
property:
mapbox-navigation-ios/Sources/MapboxCoreNavigation/RouteController.swift
Lines 587 to 589 in 3c81bdb
This contrasts to LegacyRouteController, which does happen to set both properties:
In both RouteController and LegacyRouteController, routeProgress
is publicly settable but indexedRouteResponse
is not. This makes it entirely possible for client code to have inconsistent behavior depending on how it gets the route from the Router.
/cc @mapbox/navigation-ios