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: CLLocationDistance
-
Number between 0 and 1 representing how far along the
Route
the 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!
-
Intializes a new
RouteProgress
.Declaration
Swift
public init(route: Route, legIndex: Int = 0)
Parameters
route
The route to follow.
legIndex
Zero-based index indicating the current leg the user is on.