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.

Lifecycle

  • Initializes RouteProgress with the current position, arrival time, distance along the route and additional information.

    Declaration

    Swift

    public init(
        currentGeoLocation: GeoLocation,
        arrivalTime: Measurement<UnitDuration> = .tt.seconds(0),
        distanceAlongRoute: Measurement<UnitLength> = .tt.meters(0),
        remainingRouteStopsProgress: [RouteStopProgress] = [],
        extras: String? = nil
    )

    Parameters

    currentGeoLocation

    Current position of the driver.

    arrivalTime

    Arrival time in seconds. 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.

    extras

    Optional additional information.

Public

  • Current position of the driver.

    Declaration

    Swift

    public let currentGeoLocation: GeoLocation
  • Estimated arrival time.

    Declaration

    Swift

    public let arrivalTime: Measurement<UnitDuration>
  • 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]
  • Additional information.

    Declaration

    Swift

    public let extras: String?