increase Index
fun increaseIndex(routeProgress: RouteProgress, previousIndices: NavigationIndices): NavigationIndices
This is used when a user has completed a step maneuver and the indices need to be incremented. The main purpose of this class is to determine if an additional leg exist and the step index has met the first legs total size, a leg index needs to occur and step index should be reset. Otherwise, the step index is incremented while the leg index remains the same.
Rather than returning an int array, a new instance of Navigation Indices gets returned. This provides type safety and making the code a bit more readable.
Return
a NavigationIndices object which contains the new leg and step indices
Parameters
route Progress
need a routeProgress in order to get the directions route leg list size
previous Indices
used for adjusting the indices