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 ) throws
Parameters
itinerary
The list of route locations.
costModel
Options governing which paths to prefer.
alternativeRoutesOptions
Options for calculating more than one route.
routeLegOptions
Options for each route leg, such as a polyline to follow.
guidanceOptions
Properties for the generated instructions.
departAt
A departure time for the route. Cannot be used together with arriveAt.
arriveAt
An arrival time for the route. Cannot be used together with departAt.
vehicle
The vehicle dimensions, restrictions and engine parameters.
chargingOptions
Additional options for electric vehicles to take charging into account.
queryOptions
Options regarding the way the request is sent to the server.
waypointOptimization
Defines how to optimize the order of waypoints.
mode
Defines 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 -> RoutePlanningOptions
Parameters
build
This closure allows for change of RoutePlanningOptions values
Return Value
RoutePlanningOptions with the changes set on the closure
-
The
Builder
creates a new instance ofRoutePlanningOptions
with modified fields.Declaration
Swift
public struct Builder