RouteStop

public struct RouteStop

Represents a predetermined point on a Route that is used as a reference point for navigation - Origin, Destination, Waypoint. RouteStop objects are received as part of the route response from the route planning API. RouteStop is added to the route response because either the location was requested by the user or it was automatically generated by the system (see SourceType).

  • Creates an instance of RouteStop.

    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 = .userDefined
    )

    Parameters

    id

    The ID that matches a corresponding ItineraryPoint in the routing request if this RouteStop was requested by the user.

    place

    A Place associated with this RouteStop.

    navigableCoordinates

    Coordinates that represent the navigable points of this RouteStop.

    routeOffset

    The driving distance from the start of the route to this RouteStop.

    roadSide

    The side of the road where RouteStop is located. Nil if the side of the road is unknown or irrelevant.

    arrivalEnergy

    The level of energy expected at arrival. Optional, present only for electric vehicles if electricity consumption is specified in the routing request.

    chargingInformation

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

    sourceType

    Specifies the reason why the route point was added to the route.

  • id

    The id that matches a corresponding ItineraryPoint.

    Declaration

    Swift

    public let id: UUID
  • A Place associated with this RouteStop.

    Declaration

    Swift

    public let place: Place
  • Coordinates of the navigable points of this RouteStop.

    Declaration

    Swift

    public let navigableCoordinates: [CLLocationCoordinate2D]
  • The driving distance from the start of the route to this RouteStop.

    Declaration

    Swift

    public let routeOffset: Measurement<UnitLength>
  • The side of the road where RouteStop is located. Nil if the side of the road is unknown or not relevant.

    Declaration

    Swift

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

    Declaration

    Swift

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

    Declaration

    Swift

    public let chargingInformation: ChargingInformation?
  • The SourceType of this RouteStop.

    Declaration

    Swift

    public let sourceType: SourceType