ItineraryPoint
public struct ItineraryPoint
Represents a stop on the route (origin, destination or waypoint).
A UUID identifier that points to the charging station.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public let chargingStationID: UUID?
The direction in which we want to arrive and depart at this point, measured clockwise from North.
Declaration
Swift
public var heading: Measurement<UnitAngle>?
A unique identifier of the itinerary point.
Declaration
Swift
public let id: UUID
Creates an instance of ItineraryPoint
, given a coordinate and address of a place.
Note
See Place
for more details on location parameters.
Declaration
Swift
public init(
coordinate: CLLocationCoordinate2D,
name: String? = nil,
address: Address? = nil,
heading: Measurement<UnitAngle>? = nil
)
Parameters
coordinate
|
The coordinate of the itinerary point. |
name
|
The name of the place of the itinerary point. |
address
|
The |
heading
|
The direction in which we want to arrive and depart at this point, measured clockwise from North. |
Creates an ItineraryPoint
instance.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public init(
id: UUID,
place: Place,
heading: Measurement<UnitAngle>? = nil,
pauseTime: Measurement<UnitDuration> = .tt.seconds(0)
)
Creates an ItineraryPoint
instance.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public init(
id: UUID = UUID(),
place: Place,
heading: Measurement<UnitAngle>? = nil,
pauseTime: Measurement<UnitDuration> = .tt.seconds(0),
chargingStationID: UUID? = nil,
waypointType: WaypointType? = nil
)
Creates an instance of ItineraryPoint
, given a Place
object.
Note
See Place
for more details on location parameters.
Throws
A RoutingError.badInput
if the pauseTime is negative.
Important
This is a Public Preview API. It may be changed or removed at any time.
Declaration
Swift
public init(
place: Place,
heading: Measurement<UnitAngle>? = nil,
pauseTime: Measurement<UnitDuration> = .tt.seconds(0)
) throws
Parameters
place
|
A |
heading
|
The direction in which we want to arrive and depart at this point, measured clockwise from North. |
pauseTime
|
Pause time at this itinerary point (including charging time). |
Pause time at this itinerary point (including charging time).
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public var pauseTime: Measurement<UnitDuration>
The type of the waypoint indicates whether the ItineraryPoint
it is user-defined or auto-generated.
Returns nil if this itinerary point represents origin or destination.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public let waypointType: WaypointType?