Waypoint

public struct Waypoint : RouteStop

Represents waypoint received in response from route planning API

Important

This is a Public Preview API. It may be changed or removed at any time.

Lifecycle

  • Initializer

    Declaration

    Swift

    public init(
        id: UUID,
        place: Place,
        navigableCoordinates: [CLLocationCoordinate2D],
        routeOffset: Measurement<UnitLength>,
        roadSide: RoadSide? = nil,
        arrivalEnergy: Measurement<UnitEnergy>? = nil,
        chargingInformation: ChargingInformation? = nil,
        sourceType: SourceType = SourceType.userDefined
    )

    Parameters

    id

    A unique identifier, used for matching Origin with ItineraryPoint.

    place

    A Place which represents Origin.

    navigableCoordinates

    Coordinate that represents Origin received from the Route Planning API.

    routeOffset

    The distance from the start of the route to the Destination.

    roadSide

    The side of the road where Waypoint is located.

    arrivalEnergy

    The level of energy expected at arrival. Should be present only for electric vehicles.

    chargingInformation

    Information on how much to charge at a charging station. It will only be present if this route point is a charging stop in an EV route.

    sourceType

    The source type of RouteStop.

Public

  • id

    A unique identifier, used for matching Waypoint with ItineraryPoint.

    Declaration

    Swift

    public var id: UUID
  • A Place that represents Waypoint.

    Declaration

    Swift

    public var place: Place
  • Coordinate that represents Waypoint received from the Route Planning API.

    Declaration

    Swift

    public var navigableCoordinates: [CLLocationCoordinate2D]
  • The driving distance from the start of the route to the Waypoint.

    Declaration

    Swift

    public var routeOffset: Measurement<UnitLength>
  • The side of the road where Waypoint is located.

    Declaration

    Swift

    public var roadSide: RoadSide?
  • The level of energy expected at arrival. Should be present only for electric vehicles.

    Declaration

    Swift

    public var arrivalEnergy: Measurement<UnitEnergy>?
  • Information on how much to charge at a charging station. It will only be present if this route point is a charging stop in an EV route.

    Declaration

    Swift

    public var chargingInformation: ChargingInformation?
  • The source type of Waypoint.

    Declaration

    Swift

    public var sourceType: SourceType