CostingOptionsBicycle

Objective-C

struct CostingOptionsBicycle {}

Swift

struct CostingOptionsBicycle

Options for bicycle mode

  • Penalties

    Declaration

    Objective-C

    CostingOptionsPenalties penalties

    Swift

    var penalties: CostingOptionsPenalties
  • The type of bicycle. Road: a road-style bicycle with narrow tires that is generally lightweight and designed for speed on paved surfaces. Hybrid or City: a bicycle made mostly for city riding or casual riding on roads and paths with good surfaces. Cross: a cyclo-cross bicycle, which is similar to a road bicycle but with wider tires suitable to rougher surfaces. Mountain: a mountain bicycle suitable for most surfaces but generally heavier and slower on paved surfaces. The default type is GLRouteBikeType.HYBRID.

    Declaration

    Objective-C

    GLRouteBikeType bicycleType

    Swift

    var bicycleType: GLRouteBikeType
  • Cycling speed is the average travel speed along smooth, flat roads. This is meant to be the speed a rider can comfortably maintain over the desired distance of the route. It can be modified (in the costing method) by surface type in conjunction with bicycle type and (coming soon) by hilliness of the road section. The default speed is determined by the bicycle type and are as follows: Road = 25 KPH (15.5 MPH), Cross = 20 KPH (13 MPH), Hybrid/City = 18 KPH (11.5 MPH), Mountain = 16 KPH (10 MPH).

    Declaration

    Objective-C

    float cyclingSpeed

    Swift

    var cyclingSpeed: Float
  • A cyclist’s propensity to use roads alongside other vehicles. This is a range of values from 0 to 1, where 0 attempts to avoid roads and stay on cycleways and paths, and 1 indicates the rider is more comfortable riding on roads. Based on the use_roads 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 useRoads

    Swift

    var useRoads: Float
  • A cyclist’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
  • 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 living streets. This is a range of values between 0 and 1. Values near 0 attempt to avoid living streets and values from 0.5 to 1 will currently have no effect on route selection. 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.5.

    Declaration

    Objective-C

    float useLivingStreets

    Swift

    var useLivingStreets: Float
  • This value is meant to represent how much a cyclist wants to avoid roads with poor surfaces relative to the bicycle type being used. This is a range of values between 0 and 1. When the value is 0, there is no penalization of roads with different surface types; only bicycle speed on each surface is taken into account. As the value approaches 1, roads with poor surfaces for the bike are penalized heavier so that they are only taken if they significantly improve travel time. When the value is equal to 1, all bad surfaces are completely disallowed from routing, including start and end points. The default value is 0.25.

    Declaration

    Objective-C

    float avoidBadSurfaces

    Swift

    var avoidBadSurfaces: Float
  • This value is useful when bikeshare is chosen as travel mode. It is meant to give the time will be used to return a rental bike. This value will be displayed in the final directions and used to calculate the whole duation. The default value is 120 seconds.

    Declaration

    Objective-C

    float bssReturnCost

    Swift

    var bssReturnCost: Float
  • This value is useful when bikeshare is chosen as travel mode. It is meant to describe the potential effort to return a rental bike. This value won’t be displayed and used only inside of the algorithm.

    Declaration

    Objective-C

    float bssReturnPenalty

    Swift

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