CostModel
public struct CostModel
Criteria that specify what paths to prefer during routing.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Declaration
Swift
public init ( routeType: RouteType = .fast, considerTraffic: ConsiderTraffic? = .yes, avoidOptions: AvoidOptions? = nil )Parameters
routeTypeThe overall path preference.
considerTrafficSpecifies whether current traffic should be considered when planning the route.
avoidOptionsWhat to avoid.
-
The overall path preference.
Declaration
Swift
public let routeType: RouteType -
Specifies whether current traffic should be considered when planning the route.
Declaration
Swift
public let considerTraffic: ConsiderTraffic? -
avoidOptions What to avoid.
Declaration
Swift
public let avoidOptions: AvoidOptions?
-
Copies the current CostModel with changes specified in build closure
Declaration
Swift
public func copy(build: (inout Builder) -> ()) -> CostModelParameters
buildThis closure allows for change of CostModel values
Return Value
CostModel with the changes set on the closure
-
The
Buildercreates a new instance ofCostModelwith modified fields.Declaration
Swift
public struct Builder
CostModel Structure Reference