RangeCalculationOptions
public struct RangeCalculationOptions
Options for range calculation.
-
init(origin:budgets: vehicle: routeType: considerTraffic: avoidOptions: departAt: routeToInclude: queryOptions: ) Creates a new
RangeCalculationOptionsinstance.Throws
RoutingOptionsErrorif 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() ) throwsParameters
originThe starting location of the range.
budgetsBudgets that limit the range. Only one budget is currently supported.
vehicleThe vehicle to be used. Only
Motorizedvehicles are supported. If the budget isBudget.fuelorBudget.energy, the vehicle’s consumption must be set accordingly.routeTypeSpecifies 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
routeTypeisRouteType.fast, areas which would only be reachable by going over slower roads to save energy would not be included. The default value isRouteType.fast.considerTrafficSpecifies whether to use live traffic in the range calculation. The default value is
ConsiderTraffic.yes.avoidOptionsSpecifies avoidance criteria. The default is not to include any special avoid options.
departAtThe date and time of departure from the origin point. The default value is
nil, which means a departure at the current date and time.routeToIncludeA 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.queryOptionsSpecifies 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 -
Budgets that limit the range. Only one budget is currently supported.
Declaration
Swift
public var budgets: Set<Budget> -
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
routeTypeisRouteType.fast, areas which would only be reachable by going over slower roads to save energy would not be included. The default value isRouteType.fast.Declaration
Swift
public var routeType: RouteType -
Specifies whether to use live traffic in the range calculation. The default value is
ConsiderTraffic.yes.Declaration
Swift
public var considerTraffic: ConsiderTraffic -
Specifies avoidance criteria. The default is not to include any special avoid options.
Declaration
Swift
public var avoidOptions: AvoidOptions -
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? -
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 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
TomTom SDK for iOS (0.53.1)
RangeCalculationOptions