AlternativeRoutesOptions
public struct AlternativeRoutesOptions
Specifies options related to alternative routes.
Note
Supporting points which are used for reconstructing a route and for calculating zero or more alternative routes to this reference route is part ofRouteLegOptions
-
Creates an
AlternativeRoutesOptions
instance.Throws
RoutingOptionsError
if invalid routing options provided.Declaration
Swift
public init ( maxAlternatives: Int, alternativeType: AlternativeType? = nil, minDeviationDistance: Measurement<UnitLength>? = nil, minDeviationTime: Measurement<UnitDuration>? = nil ) throws
Parameters
maxAlternatives
Maximum number of alternative routes to generate in addition to the primary route.
alternativeType
Whether to find only better routes or any alternative to a given reference route. Can only be used with route reconstructions.
minDeviationDistance
Follow the reference route for at least this distance before deviating. Can only be used with route reconstructions.
minDeviationTime
Follow the reference route for at least this travel time before deviating. Can only be used with route reconstructions.
-
Maximum number of alternative routes to generate in addition to the primary route.
Declaration
Swift
public let maxAlternatives: Int
-
Whether to find only better routes or any alternative to a given reference route. Can only be used with route reconstructions.
Declaration
Swift
public let alternativeType: AlternativeType?
-
Follow the reference route for at least this distance before deviating. Can only be used with route reconstructions.
Declaration
Swift
public let minDeviationDistance: Measurement<UnitLength>?
-
Follow the reference route for at least this travel time before deviating. Can only be used with route reconstructions.
Declaration
Swift
public let minDeviationTime: Measurement<UnitDuration>?