RoutePlanningOptions
public struct RoutePlanningOptions : RoutingOptionsWithItinerary
Options for route planning.
Important
This is a Public Preview API. It may be changed or removed at any time.-
init(itinerary:costModel: alternativeRoutesOptions: routeLegOptions: guidanceOptions: departAt: arriveAt: vehicle: chargingOptions: queryOptions: waypointOptimization: mode: ) Declaration
Swift
public init ( itinerary: Itinerary, costModel: CostModel? = nil, alternativeRoutesOptions: AlternativeRoutesOptions? = nil, routeLegOptions: [RouteLegOptions] = [], guidanceOptions: GuidanceOptions? = nil, departAt: Date? = nil, arriveAt: Date? = nil, vehicle: Vehicle? = Car(), chargingOptions: ChargingOptions? = nil, queryOptions: QueryOptions? = nil, waypointOptimization: WaypointOptimization? = nil, mode: RouteInformationMode = .complete ) 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.
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.
-
The list of route locations.
Declaration
Swift
public let itinerary: Itinerary -
Options governing which paths to prefer.
Declaration
Swift
public let costModel: CostModel? -
Options for calculating more than one route.
Declaration
Swift
public let alternativeRoutesOptions: AlternativeRoutesOptions? -
Options for each route leg, such as a polyline to follow.
Declaration
Swift
public let routeLegOptions: [RouteLegOptions] -
Properties for the generated instructions.
Declaration
Swift
public let guidanceOptions: GuidanceOptions? -
A departure time for the route. Cannot be used together with arriveAt.
Declaration
Swift
public let departAt: Date? -
An arrival time for the route. Cannot be used together with departAt.
Declaration
Swift
public let arriveAt: Date? -
The vehicle dimensions, restrictions and engine parameters.
Declaration
Swift
public let vehicle: Vehicle? -
Additional options for electric vehicles to take charging into account.
Declaration
Swift
public let chargingOptions: ChargingOptions? -
Options regarding the way the request is sent to the server.
Declaration
Swift
public let queryOptions: QueryOptions? -
The way of optimizing the order of waypoints
Declaration
Swift
public let waypointOptimization: WaypointOptimization? -
Defines how much guidance information (instructions and lane guidance) is returned with the route.
Declaration
Swift
public let mode: RouteInformationMode
-
Copies the current RoutePlanningOptions with changes specified in build closure
Declaration
Swift
public func copy(build: (inout Builder) throws -> ()) throws -> RoutePlanningOptionsParameters
buildThis closure allows for change of RoutePlanningOptions values
Return Value
RoutePlanningOptions with the changes set on the closure
-
The
Buildercreates a new instance ofRoutePlanningOptionswith modified fields.Declaration
Swift
public struct Builder
RoutePlanningOptions Structure Reference