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).
-
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
idThe ID that matches a corresponding
ItineraryPointin the routing request if thisRouteStopwas requested by the user.placeA
Placeassociated with thisRouteStop.navigableCoordinatesCoordinates that represent the navigable points of this
RouteStop.routeOffsetThe driving distance from the start of the route to this
RouteStop.roadSideThe side of the road where
RouteStopis located. Nil if the side of the road is unknown or irrelevant.arrivalEnergyThe level of energy expected at arrival. Optional, present only for electric vehicles if electricity consumption is specified in the routing request.
chargingInformationInformation 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.
sourceTypeSpecifies the reason why the route point was added to the route.
-
The id that matches a corresponding
ItineraryPoint.Declaration
Swift
public let id: UUID -
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
RouteStopis 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
RouteStopis a charging stop on an EV route.Declaration
Swift
public let chargingInformation: ChargingInformation? -
The
SourceTypeof thisRouteStop.Declaration
Swift
public let sourceType: SourceType
TomTom SDK for iOS (0.53.1)
RouteStop