IndexedRouteResponse
public struct IndexedRouteResponse
A RouteResponse
object that sorts routes from most optimal to least optimal and selected route index in it.
-
RouteResponse
object, containing selection of routes to follow.Declaration
Swift
public let routeResponse: RouteResponse
-
The index of the selected route within the
routeResponse
.Updating this value after turn-by-turn navigation has started will have no effect. To actually update the route, use
Router.updateRoute(with:routeOptions:completion:)
method from correspondingrouter
.Declaration
Swift
public var routeIndex: Int
-
Returns a route from the
routeResponse
under givenrouteIndex
if possible.Declaration
Swift
public var currentRoute: Route? { get }
-
Parses routes in the current response, accounting
routeIndex
to be pointing to the primary route, while all the others beingAlternativeRoute
s.Declaration
Swift
public func parseAlternativeRoutes() -> [AlternativeRoute]
Return Value
Array of
AlternativeRoutes
containing relative information tocurrentRoute
. -
Initializes a new
IndexedRouteResponse
object.Declaration
Swift
public init(routeResponse: RouteResponse, routeIndex: Int)
Parameters
routeResponse
RouteResponse
object, containing routes and other related info.routeIndex
Selected route index in an array.