ScooterSpecification
public struct ScooterSpecification : Hashable
Scooter specific settings.
-
Specifies whether scooter is allowed on highway or not.
Truemeans scooter is allowed to use highways andfalsemeans otherwise. Defaults tofalse. Note that there is a similar parameter inAvoidanceOptions, to disallow highway usage, seeRoadFeatures.CONTROLLED_ACCESS_HIGHWAY. As the avoidance options takes precedence, if this parameter is also used, then scooters are not allowed to use highways even ifallowHighwayis set totrue. However, if no alternative route is possible, the calculated route may use highways. In such a case, aSectionNoticewill be provided in the relatedSectionto indicate that the highway usage restriction is violated on this route. A few examples:1 - If no avoidance option is set, and
allowHighway = false, when no route is found without highway usage, a notice is received.2 - If no avoidance option is set, and
allowHighway = true, when no route is found without highway usage, no notice is received.3 - If only
avoid[features] = controlledAccessHighwayis set, when no route is found without highway usage, a notice is received.4 - If both
avoid[features] = controlledAccessHighwayandallowHighway = trueare set, when no route is found without highway usage, a notice is received.Declaration
Swift
public var allowScooterOnHighway: Bool -
Creates a new instance.
Parameters
- allowScooterOnHighway: Specifies whether scooter is allowed on highway or not.
Truemeans scooter is allowed to use highways andfalsemeans otherwise. Defaults tofalse. Note that there is a similar parameter inAvoidanceOptions, to disallow highway usage, seeRoadFeatures.CONTROLLED_ACCESS_HIGHWAY. As the avoidance options takes precedence, if this parameter is also used, then scooters are not allowed to use highways even ifallowHighwayis set totrue. However, if no alternative route is possible, the calculated route may use highways. In such a case, aSectionNoticewill be provided in the relatedSectionto indicate that the highway usage restriction is violated on this route. A few examples:
1 - If no avoidance option is set, and
allowHighway = false, when no route is found without highway usage, a notice is received.2 - If no avoidance option is set, and
allowHighway = true, when no route is found without highway usage, no notice is received.3 - If only
avoid[features] = controlledAccessHighwayis set, when no route is found without highway usage, a notice is received.4 - If both
avoid[features] = controlledAccessHighwayandallowHighway = trueare set, when no route is found without highway usage, a notice is received.- allowScooterOnHighway: Specifies whether scooter is allowed on highway or not.
Declaration
Swift
public init(allowScooterOnHighway: Bool = false)