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.
  • Initializes RouteProgress with the current position, arrival time, distance along the route and additional information.

    Precondition

    The argument remainingRouteStopsProgress must contain at least one RouteStopProgress object for a destination. If the array is empty, the program stops execution.

    Declaration

    Swift

    public init(
        distanceAlongRoute: Measurement<UnitLength>,
        remainingRouteStopsProgress: [RouteStopProgress]
    )

    Parameters

    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.

  • 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]
  • Estimated duration left to reach the destination.

    Declaration

    Swift

    public var remainingTrafficDelay: Measurement<UnitDuration> { get }
  • Estimated remaining time until we reach the destination.

    Declaration

    Swift

    public var remainingTime: Measurement<UnitDuration> { get }
  • Distance along the route from current location till destination.

    Declaration

    Swift

    public var remainingDistance: Measurement<UnitLength> { get }