CostingOptionsPedestrian
Objective-C
struct CostingOptionsPedestrian {}
Swift
struct CostingOptionsPedestrian
Options for pedestrian mode
-
Walking speed in kilometers per hour. Must be between 0.5 and 25 km/hr. Defaults to 5.1 km/hr (3.1 miles/hour).
Declaration
Objective-C
float walkingSpeed
Swift
var walkingSpeed: Float
-
A factor that modifies the cost when encountering roads classified as footway (no motorized vehicles allowed), which may be designated footpaths or designated sidewalks along residential roads. Pedestrian routes generally attempt to favor using these walkways and sidewalks. The default walkway_factor is 1.0.
Declaration
Objective-C
float walkwayFactor
Swift
var walkwayFactor: Float
-
A factor that modifies the cost when encountering roads with dedicated sidewalks. Pedestrian routes generally attempt to favor using sidewalks. The default sidewalk_factor is 1.0.
Declaration
Objective-C
float sidewalkFactor
Swift
var sidewalkFactor: Float
-
A factor that modifies (multiplies) the cost when alleys are encountered. Pedestrian routes generally want to avoid alleys or narrow service roads between buildings. The default alley_factor is 2.0.
Declaration
Objective-C
float alleyFactor
Swift
var alleyFactor: Float
-
A factor that modifies (multiplies) the cost when encountering a driveway, which is often a private, service road. Pedestrian routes generally want to avoid driveways (private). The default driveway factor is 5.0.
Declaration
Objective-C
float drivewayFactor
Swift
var drivewayFactor: Float
-
A penalty in seconds added to each transition onto a path with steps or stairs. Higher values apply larger cost penalties to avoid paths that contain flights of steps.
Declaration
Objective-C
float stepPenalty
Swift
var stepPenalty: Float
-
This value indicates the willingness to take ferries. This is 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 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.6.
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.5.
Declaration
Objective-C
float useTracks
Swift
var useTracks: Float
-
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 pedestrian 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 is a range of values from 0 to 1, where 0 indicates indifference towards lit streets, and 1 indicates that unlit streets should be avoided. Note that even with values near 1, there is no guarantee the returned route will include lit segments. The default value is 0.
Declaration
Objective-C
float useLit
Swift
var useLit: Float
-
A penalty applied for transition to generic service road. The default penalty is 0.
Declaration
Objective-C
float servicePenalty
Swift
var servicePenalty: 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
-
This value indicates the maximum difficulty of hiking trails that is allowed. Values between 0 and 6 are allowed. The values correspond to sac_scale values within OpenStreetMap, see reference https://wiki.openstreetmap.org/wiki/Key:sac_scale. The default value is 1 which means that well cleared trails that are mostly flat or slightly sloped are allowed. Higher difficulty trails can be allowed by specifying a higher value for max_hiking_difficulty.
Declaration
Objective-C
float maxHikingDifficulty
Swift
var maxHikingDifficulty: Float
-
This value is useful when bikeshare is chosen as travel mode. It is meant to give the time will be used to rent a bike from a bike share station. 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 bssRentCost
Swift
var bssRentCost: Float
-
This value is useful when bikeshare is chosen as travel mode. It is meant to describe the potential effort to rent a bike from a bike share station. This value won’t be displayed and used only inside of the algorithm.
Declaration
Objective-C
float bssRentPenalty
Swift
var bssRentPenalty: 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
-
A pedestrian option that can be added to the request to extend the defaults (2145 meters or approximately 1.5 miles). This is the maximum walking distance at the beginning or end of a route.
Declaration
Objective-C
float transitStartEndMaxDistance
Swift
var transitStartEndMaxDistance: Float
-
A pedestrian option that can be added to the request to extend the defaults (800 meters or 0.5 miles). This is the maximum walking distance between transfers.
Declaration
Objective-C
float transitTransferMaxDistance
Swift
var transitTransferMaxDistance: Float