RoutePlanningOptions
public struct RoutePlanningOptions : RoutingOptionsWithItinerary
Options for route planning.
-
init(itinerary:costModel: alternativeRoutesOptions: routeLegOptions: guidanceOptions: departAt: arriveAt: vehicle: chargingOptions: queryOptions: waypointOptimization: mode: arrivalSidePreference: reconstructionMode: ) Creates a new
RoutePlanningOptionsinstance.Note
The parameters departAt and arriveAt are not yet supported with the Orbis map.Throws
RoutingOptionsErrorif invalid routing options provided.Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public init ( itinerary: Itinerary, costModel: CostModel? = nil, alternativeRoutesOptions: AlternativeRoutesOptions? = nil, routeLegOptions: [RouteLegOptions] = [], guidanceOptions: GuidanceOptions? = nil, departAt: Date? = nil, arriveAt: Date? = nil, vehicle: any Vehicle = Car(), chargingOptions: ChargingOptions? = nil, queryOptions: QueryOptions? = nil, waypointOptimization: WaypointOptimization? = nil, mode: RouteInformationMode = .complete, arrivalSidePreference: ArrivalSidePreference = .anySide, reconstructionMode: ReconstructionMode? = nil ) throwsParameters
itineraryThe list of route locations.
costModelOptions governing which paths to prefer.
alternativeRoutesOptionsOptions for calculating more than one route.
routeLegOptionsOptions for each route leg, such as a polyline to follow.
guidanceOptionsProperties for the generated instructions. Instructions will not be generated if the options are not set.
departAtA departure time for the route. Cannot be used together with arriveAt.
arriveAtAn arrival time for the route. Cannot be used together with departAt.
vehicleThe vehicle dimensions, restrictions and engine parameters. If
guidanceOptionsare provided, the vehicle must be of typeTomTomSDKCommon/VehicleType/car,TomTomSDKCommonVehicleType/motorcycleorTomTomSDKCommon/VehicleType/truck. Please useTomTomSDKCommon/VehicleType/carforTomTomSDKCommon/VehicleType/taxi.chargingOptionsAdditional options for electric vehicles to take charging into account.
queryOptionsOptions regarding the way the request is sent to the server.
waypointOptimizationDefines how to optimize the order of waypoints.
modeDefines how much guidance information (instructions and land guidance) is returned with the route.
arrivalSidePreferenceDefines road side on arrival preference for waypoints and destination.
reconstructionModeDefines the reconstruction mode used for route reconstruction.
-
init(itinerary:routeType: considerTraffic: avoidOptions: alternativeRoutesOptions: routeLegOptions: guidanceOptions: departAt: arriveAt: vehicle: chargingOptions: queryOptions: waypointOptimization: mode: arrivalSidePreference: reconstructionMode: ) Creates a new
RoutePlanningOptionsinstance.Note
The parameters departAt and arriveAt are not supported with the Orbis map.Throws
RoutingOptionsErrorif invalid routing options provided.Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public init ( itinerary: Itinerary, routeType: RouteType? = nil, considerTraffic: ConsiderTraffic? = nil, avoidOptions: AvoidOptions? = nil, alternativeRoutesOptions: AlternativeRoutesOptions? = nil, routeLegOptions: [RouteLegOptions] = [], guidanceOptions: GuidanceOptions? = nil, departAt: Date? = nil, arriveAt: Date? = nil, vehicle: any Vehicle = Car(), chargingOptions: ChargingOptions? = nil, queryOptions: QueryOptions? = nil, waypointOptimization: WaypointOptimization? = nil, mode: RouteInformationMode = .complete, arrivalSidePreference: ArrivalSidePreference = .anySide, reconstructionMode: ReconstructionMode? = nil ) throwsParameters
itineraryThe list of route locations.
routeTypeGeneral strategy for selecting roads during route calculation.
considerTrafficUse live traffic in the route calculation.
avoidOptionsAvoidance criteria.
alternativeRoutesOptionsOptions for calculating more than one route.
routeLegOptionsOptions for each route leg, such as a polyline to follow.
guidanceOptionsProperties for the generated instructions. Instructions will not be generated if the options are not set.
departAtA departure time for the route. Cannot be used together with arriveAt.
arriveAtAn arrival time for the route. Cannot be used together with departAt.
vehicleThe vehicle dimensions, restrictions and engine parameters.
chargingOptionsAdditional options for electric vehicles to take charging into account.
queryOptionsOptions regarding the way the request is sent to the server.
waypointOptimizationDefines how to optimize the order of waypoints.
modeDefines how much guidance information (instructions and land guidance) is returned with the route.
arrivalSidePreferenceDefines road side on arrival preference for waypoints and destination.
reconstructionModeDefines the reconstruction mode used for route reconstruction.
-
The list of route locations.
Declaration
Swift
public var itinerary: Itinerary -
Options governing which paths to prefer.
Declaration
Swift
public var costModel: CostModel? -
Options for calculating more than one route.
Declaration
Swift
public var alternativeRoutesOptions: AlternativeRoutesOptions? -
Options for each route leg, such as a polyline to follow.
Declaration
Swift
public var routeLegOptions: [RouteLegOptions] -
Properties for the generated instructions. Instructions will not be generated if the options are not set.
Declaration
Swift
public var guidanceOptions: GuidanceOptions? -
A departure time for the route. Cannot be used together with arriveAt.
Note
This option is not supported with the Orbis map.Declaration
Swift
public var departAt: Date? -
An arrival time for the route. Cannot be used together with departAt.
Note
This option is not supported with the Orbis map.Declaration
Swift
public var arriveAt: Date? -
The vehicle dimensions, restrictions and engine parameters.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public var vehicle: any Vehicle -
Additional options for electric vehicles to take charging into account.
Declaration
Swift
public var chargingOptions: ChargingOptions? -
Options regarding the way the request is sent to the server.
Declaration
Swift
public var queryOptions: QueryOptions? -
The way of optimizing the order of waypoints
Declaration
Swift
public var waypointOptimization: WaypointOptimization? -
Defines how much guidance information (instructions and lane guidance) is returned with the route.
Declaration
Swift
public var mode: RouteInformationMode -
Defines the reconstruction mode used for route reconstruction.
Note
This option is not supported with the Orbis map.Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public var reconstructionMode: ReconstructionMode? -
Specifies road side on arrival preference for waypoints and destination.
Declaration
Swift
public var arrivalSidePreference: ArrivalSidePreference -
Defines general strategy for selecting roads during route calculation.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public var routeType: RouteType? { get } -
Defines if live traffic should be used in route calculation.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public var considerTraffic: ConsiderTraffic? { get } -
Specifies avoidance criteria.
Important
This is a Public Preview API. It may be changed or removed at any time.Declaration
Swift
public var avoidOptions: AvoidOptions? { get }
TomTom SDK for iOS (0.53.1)
RoutePlanningOptions