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.

    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.

  • Declaration

    Swift

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