RouteProgress
open class RouteProgress: NSObject
RouteProgress stores the user’s progress along a route.
-
Returns the current
Route.Declaration
Swift
public let route: Route -
Index representing current
RouteLeg.Declaration
Swift
public var legIndex: Int
-
If waypoints are provided in the
Route, this will contain which leg the user is on.Declaration
Swift
public var currentLeg: RouteLeg -
Total distance traveled by user along all legs.
Declaration
Swift
public var distanceTraveled: CLLocationDistance -
Total seconds remaining on all legs.
Declaration
Swift
public var durationRemaining: TimeInterval -
Number between 0 and 1 representing how far along the
Routethe user has traveled.Declaration
Swift
public var fractionTraveled: Double -
Total distance remaining in meters along route.
Declaration
Swift
public var distanceRemaining: CLLocationDistance -
Number of waypoints remaining on the current route.
Declaration
Swift
public var remainingWaypoints: [Waypoint] -
Returns the progress along the current
RouteLeg.Declaration
Swift
public var currentLegProgress: RouteLegProgress! -
Tuple containing a
CongestionLeveland a correspondingTimeIntervalrepresenting the expected travel time for this segment.Declaration
Swift
public typealias TimedCongestionLevel = (CongestionLevel, TimeInterval) -
If the route contains both
segmentCongestionLevelsandexpectedSegmentTravelTimes, this property is set to a deeply nested array ofTimeCongestionLevelsper segment per step per leg.Declaration
Swift
public var congestionTravelTimesSegmentsByStep: [[[TimedCongestionLevel]]] = [] -
An dictionary containing a
TimeIntervaltotal perCongestionLevel. OnlyCongestionLevelfounnd on that step will present. Broken up by leg and then step.Declaration
Swift
public var congestionTimesPerStep: [[[CongestionLevel: TimeInterval]]] = [[[:]]] -
Intializes a new
RouteProgress.Declaration
Swift
public init(route: Route, legIndex: Int = 0, alertLevel: AlertLevel = .none)Parameters
routeThe route to follow.
legIndexZero-based index indicating the current leg the user is on.
alertLevelOptional
AlertLevelto start theRouteProgressat.
Install in Dash
RouteProgress Class Reference