IndexedRouteResponse
public struct IndexedRouteResponse
A RouteResponse object that sorts routes from most optimal to least optimal and selected route index in it.
-
RouteResponseobject, 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
routeResponseunder givenrouteIndexif possible.Declaration
Swift
public var currentRoute: Route? { get } -
Parses routes in the current response, accounting
routeIndexto be pointing to the primary route, while all the others beingAlternativeRoutes.Declaration
Swift
public func parseAlternativeRoutes() -> [AlternativeRoute]Return Value
Array of
AlternativeRoutescontaining relative information tocurrentRoute. -
Initializes a new
IndexedRouteResponseobject.Declaration
Swift
public init(routeResponse: RouteResponse, routeIndex: Int)Parameters
routeResponseRouteResponseobject, containing routes and other related info.routeIndexSelected route index in an array.
Install in Dash
IndexedRouteResponse Structure Reference