RangeCalculationOptions
public struct RangeCalculationOptions
Options for range calculation.
Specifies avoidance criteria. The default is not to include any special avoid options.
Declaration
Swift
public var avoidOptions: AvoidOptions
Budgets that limit the range. Only one budget is currently supported.
Declaration
Swift
public var budgets: Set<Budget>
Specifies whether to use live traffic in the range calculation. The default value is ConsiderTraffic.yes
.
Declaration
Swift
public var considerTraffic: ConsiderTraffic
The date and time of departure from the origin point. The default value is nil
, which means a departure at the current date and time.
Declaration
Swift
public var departAt: Date?
init(origin:budgets:vehicle:routeType:considerTraffic:avoidOptions:departAt:routeToInclude:queryOptions:)
Creates a new RangeCalculationOptions
instance.
Throws
RoutingOptionsError
if any of the parameters violates its requirements.
Declaration
Swift
public init
(
origin: ItineraryPoint,
budgets: Set<Budget>,
vehicle: any Vehicle = Car(),
routeType: RouteType = .fast,
considerTraffic: ConsiderTraffic = .yes,
avoidOptions: AvoidOptions = AvoidOptions(),
departAt: Date? = nil,
routeToInclude: Route? = nil,
queryOptions: QueryOptions = QueryOptions()
) throws
Parameters
origin
|
The starting location of the range. |
budgets
|
Budgets that limit the range. Only one budget is currently supported. |
vehicle
|
The vehicle to be used. Only |
routeType
|
Specifies the general strategy for selecting paths during range calculation. The resulting range will only contain areas reachable via routes of this type.
For example, when |
considerTraffic
|
Specifies whether to use live traffic in the range calculation. The default value is |
avoidOptions
|
Specifies avoidance criteria. The default is not to include any special avoid options. |
departAt
|
The date and time of departure from the origin point. The default value is |
routeToInclude
|
A route that must be included in the range up to the reachable offset. It is used to visually align the range boundary with the reachable offset on the currently navigated route, if there is one.
It is recommended to pass the navigated route here if it is displayed simultaneously with the range. The default value is |
queryOptions
|
Specifies options regarding how the request is sent to the server. The default is not to include any special query options. |
The starting location of the range.
Declaration
Swift
public var origin: ItineraryPoint
Specifies options regarding how the request is sent to the server. The default is not to include any special query options.
Declaration
Swift
public var queryOptions: QueryOptions
A route that must be included in the range up to the reachable offset. It is used to visually align the range boundary with the reachable offset on the currently navigated route,if there is one.
It is recommended to pass the navigated route here if it is displayed simultaneously with the range. The default value is nil
, which means no route is included in the range.
Declaration
Swift
public var routeToInclude: Route?
Specifies the general strategy for selecting paths during range calculation. The resulting range will only contain areas reachable via routes of this type.
For example, when routeType
is RouteType.fast
, areas which would only be reachable by going over slower roads to save energy would not be included.
The default value is RouteType.fast
.
Declaration
Swift
public var routeType: RouteType