RouteProgress
public struct RouteProgress
The RouteProgress class provides information about the driver’s progress along the route.
Important
This is a Public Preview API. It may be changed or removed at any time.-
init(remainingTime:
remainingDistance: distanceAlongRoute: remainingRouteStopsProgress: remainingTrafficDelay: ) Initializes
RouteProgress
with the current position, arrival time, distance along the route and additional information.Declaration
Swift
public init( remainingTime: Measurement<UnitDuration>, remainingDistance: Measurement<UnitLength>, distanceAlongRoute: Measurement<UnitLength>, remainingRouteStopsProgress: [RouteStopProgress] = [], remainingTrafficDelay: Measurement<UnitDuration> = .tt.seconds(0) )
Parameters
remainingTime
Arrival time in seconds. Defaults to 0.
remainingDistance
Distance along the route from current location till destination. Defaults to 0.
distanceAlongRoute
Distance from the beginning of the route to the driver’s current position. Defaults to 0.
remainingRouteStopsProgress
Array of RouteStopProgress (which contains route progress for particular waypoint) for waypoints which are not visited yet.
remainingTrafficDelay
remaining time in trafic
-
Estimated remaining time until we reach the destination.
Declaration
Swift
public let remainingTime: Measurement<UnitDuration>
-
Distance along the route from current location till destination.
Declaration
Swift
public let remainingDistance: Measurement<UnitLength>
-
Distance already traveled along the route.
Declaration
Swift
public let distanceAlongRoute: Measurement<UnitLength>
-
An array of individual
RouteStopProgress
for remaining waypoints on the route.Declaration
Swift
public let remainingRouteStopsProgress: [RouteStopProgress]
-
Remaining time in trafic.
Declaration
Swift
public let remainingTrafficDelay: Measurement<UnitDuration>