CostingOptionsMotorScooter

Objective-C

struct CostingOptionsMotorScooter {}

Swift

struct CostingOptionsMotorScooter

Options for straight mode

  • Road options

    Declaration

    Objective-C

    CostingOptionsRoad road

    Swift

    var road: CostingOptionsRoad
  • Top speed the motorized scooter can go. Used to avoid roads with higher speeds than this value. For motor_scooter this value must be between 20 and 120 KPH. The default value is 45 KPH (~28 MPH)

    Declaration

    Objective-C

    float topSpeed

    Swift

    var topSpeed: Float
  • A riders’s propensity to use primary roads. This is a range of values from 0 to 1, where 0 attempts to avoid primary roads, and 1 indicates the rider is more comfortable riding on primary roads. Based on the use_primary factor, roads with certain classifications and higher speeds are penalized in an attempt to avoid them when finding the best path. The default value is 0.5.

    Declaration

    Objective-C

    float usePrimary

    Swift

    var usePrimary: Float
  • A riders’s desire to tackle hills in their routes. This is a range of values from 0 to 1, where 0 attempts to avoid hills and steep grades even if it means a longer (time and distance) path, while 1 indicates the rider does not fear hills and steeper grades. Based on the use_hills factor, penalties are applied to roads based on elevation change and grade. These penalties help the path avoid hilly roads in favor of flatter roads or less steep grades where available. Note that it is not always possible to find alternate paths to avoid hills (for example when route locations are in mountainous areas). The default value is 0.5.

    Declaration

    Objective-C

    float useHills

    Swift

    var useHills: 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