RangeCalculationOptions

public struct RangeCalculationOptions

Options for range calculation.

  • 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 Motorized vehicles are supported. If the budget is Budget.fuel or Budget.energy, the vehicle’s consumption must be set accordingly.

    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 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.

    considerTraffic

    Specifies whether to use live traffic in the range calculation. The default value is ConsiderTraffic.yes.

    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 nil, which means a departure at the current date and time.

    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 nil, which means no route is included in the range.

    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
  • Budgets that limit the range. Only one budget is currently supported.

    Declaration

    Swift

    public var budgets: Set<Budget>
  • The vehicle to be used. Only Motorized vehicles are supported. If the budget is Budget.fuel or Budget.energy, the vehicle’s consumption must be set accordingly.

    Declaration

    Swift

    public var vehicle: any Vehicle
  • 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
  • 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