CostingOptionsRoad

Objective-C

struct CostingOptionsRoad {}

Swift

struct CostingOptionsRoad

General options when driving on road

  • Penalties

    Declaration

    Objective-C

    CostingOptionsPenalties penalties

    Swift

    var penalties: CostingOptionsPenalties
  • A penalty applied when a gate or bollard with access=private is encountered. The default private access penalty is 450 seconds.

    Declaration

    Objective-C

    float privateAccessPenalty

    Swift

    var privateAccessPenalty: Float
  • A cost applied when a toll booth is encountered. This cost is added to the estimated and elapsed times. The default cost is 15 seconds.

    Declaration

    Objective-C

    float tollBoothCost

    Swift

    var tollBoothCost: Float
  • A penalty applied to the cost when a toll booth is encountered. This penalty can be used to create paths that avoid toll roads. The default toll booth penalty is 0.

    Declaration

    Objective-C

    float tollBoothPenalty

    Swift

    var tollBoothPenalty: Float
  • A cost applied when entering a ferry. This cost is added to the estimated and elapsed times. The default cost is 300 seconds (5 minutes).

    Declaration

    Objective-C

    float ferryCost

    Swift

    var ferryCost: Float
  • This value indicates the willingness to take ferries. This is a range of values between 0 and 1. Values near 0 attempt to avoid ferries and values near 1 will favor ferries. Note that sometimes ferries are required to complete a route so values of 0 are not guaranteed to avoid ferries entirely. The default value is 0.5.

    Declaration

    Objective-C

    float useFerry

    Swift

    var useFerry: Float
  • This value indicates the willingness to take highways. This is a range of values between 0 and 1. Values near 0 attempt to avoid highways and values near 1 will favor highways. Note that sometimes highways are required to complete a route so values of 0 are not guaranteed to avoid highways entirely. The default value is 1.0.

    Declaration

    Objective-C

    float useHighways

    Swift

    var useHighways: Float
  • This value indicates the willingness to take roads with tolls. This is a range of values between 0 and 1. Values near 0 attempt to avoid tolls and values near 1 will not attempt to avoid them. Note that sometimes roads with tolls are required to complete a route so values of 0 are not guaranteed to avoid them entirely. The default value is 0.5.

    Declaration

    Objective-C

    float useTolls

    Swift

    var useTolls: Float
  • This value indicates the willingness to take living streets. This is a range of values between 0 and 1. Values near 0 attempt to avoid living streets and values near 1 will favor living streets. Note that sometimes living streets are required to complete a route so values of 0 are not guaranteed to avoid living streets entirely. The default value is 0 for trucks, 0.1 for cars, buses, motor scooters and motorcycles.

    Declaration

    Objective-C

    float useLivingStreets

    Swift

    var useLivingStreets: Float
  • This value indicates the willingness to take track roads. This is a range of values between 0 and 1. Values near 0 attempt to avoid tracks and values near 1 will favor tracks a little bit. Note that sometimes tracks are required to complete a route so values of 0 are not guaranteed to avoid tracks entirely. The default value is 0 for autos, 0.5 for motor scooters and motorcycles.

    Declaration

    Objective-C

    float useTracks

    Swift

    var useTracks: Float
  • A factor that modifies (multiplies) the cost when generic service roads are encountered. The default service_factor is 1.

    Declaration

    Objective-C

    float serviceFactor

    Swift

    var serviceFactor: Float
  • Changes the metric to quasi-shortest, i.e. purely distance-based costing. Note, this will disable all other costings & penalties. Also note, shortest will not disable hierarchy pruning, leading to potentially sub-optimal routes for some costing models. The default is false.

    Declaration

    Objective-C

    _Bool shortest

    Swift

    var shortest: Bool
  • Top speed the vehicle can go. Also used to avoid roads with higher speeds than this value. top_speed must be between 10 and 252 KPH. The default value is 140 KPH.

    Declaration

    Objective-C

    float topSpeed

    Swift

    var topSpeed: Float
  • Fixed speed the vehicle can go. Used to override the calculated speed. Can be useful if speed of vehicle is known. fixed_speed must be between 1 and 252 KPH. The default value is 0 KPH which disables fixed speed and falls back to the standard calculated speed based on the road attribution.

    Declaration

    Objective-C

    float fixedSpeed

    Swift

    var fixedSpeed: Float
  • If set to true, ignores all closures, marked due to live traffic closures, during routing. Note: This option cannot be set if location.search_filter.exclude_closures is also specified in the request and will return an error if it is

    Declaration

    Objective-C

    _Bool ignoreClosures

    Swift

    var ignoreClosures: Bool
  • A factor that penalizes the cost when traversing a closed edge (eg: if search_filter.exclude_closures is false for origin and/or destination location and the route starts/ends on closed edges). Its value can range from 1.0 - don’t penalize closed edges, to 10.0 - apply high cost penalty to closed edges. Note: This factor is applicable only for motorized modes of transport, i.e auto, motorcycle, motor_scooter, bus, truck & taxi. Default value is 9.0.

    Declaration

    Objective-C

    float closureFactor

    Swift

    var closureFactor: Float