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
).
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 id that matches a corresponding ItineraryPoint
.
Declaration
Swift
public let id: UUID
init(id:place:navigableCoordinates:routeOffset:roadSide:arrivalEnergy:chargingInformation: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 |
place
|
A |
navigableCoordinates
|
Coordinates that represent the navigable points of this |
routeOffset
|
The driving distance from the start of the route to this |
roadSide
|
The side of the road where |
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. |
Coordinates of the navigable points of this RouteStop
.
Declaration
Swift
public let navigableCoordinates: [CLLocationCoordinate2D]
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 driving distance from the start of the route to this RouteStop
.
Declaration
Swift
public let routeOffset: Measurement<UnitLength>
The SourceType
of this RouteStop
.
Declaration
Swift
public let sourceType: SourceType