ScooterOptions
public struct ScooterOptions : Hashable
All the options to specify how a scooter route should be calculated.
-
Specifies the common route calculation options.
Declaration
Swift
public var routeOptions: RouteOptions -
Customize textual content returned from the route calculation, such as localization, format, and unit system.
Declaration
Swift
public var textOptions: RouteTextOptions -
Options to specify restrictions for route calculations. By default no restrictions are applied.
Declaration
Swift
public var avoidanceOptions: AvoidanceOptions -
Options to specify how the tolls should be calculated, such as transponders, vehicle category, and emission type.
Declaration
Swift
public var tollOptions: TollOptions -
Specifies the number of occupants in the vehicle, including driver. Shouldn’t be less than 1 or greater than 255. Defaults to 1. This option is only relevant for Japan and will be ignored for other countries.
Declaration
Swift
public var occupantsNumber: Int32 -
Specifies the last character of a vehicle’s license plate, typically used to evaluate traffic restrictions in certain environmental or low-emission zones. In cities like Bogotá, Mexico City, or Jakarta, specific license plate digits may be restricted on certain days or in certain areas to reduce congestion and emissions. When this value is provided, the HERE SDK considers it during route calculation to avoid roads or areas where your vehicle may be restricted based on local regulations. Example usage: “7”, when the license plate of a vehicle looks like “B-ET-182487”.
If this value is not set, such license plate-based restrictions are ignored, and routing is performed without considering them.
Declaration
Swift
public var lastCharacterOfLicensePlate: String? -
Segments with restriction on maximum
DynamicSpeedInfo.baseSpeedInMetersPerSecond.Declaration
Swift
public var maxSpeedOnSegments: [MaxSpeedOnSegment] -
Specifies whether scooter is allowed on highway or not.
Truemeans scooter is allowed to use highways andfalsemeans otherwise. By default it is set tofalse. Note that there is a similar parameter inAvoidanceOptions, to disallow highway usage, seeRoadFeatures.controlledAccessHighway. 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 allowHighway: Bool -
Engine size of the scooter in cubic centimeters. Shouldn’t be less than 1 or greater than 65535. Default value is
nil, which means the scooter route calculation ignores all engine size limits on the road.Note: For now, this option is only relevant in Japan and will be ignored for other countries. Currently, map data for this option is only available for Japan.
Declaration
Swift
public var engineSizeInCubicCentimeters: Int32? -
init(routeOptions:textOptions: avoidanceOptions: tollOptions: occupantsNumber: lastCharacterOfLicensePlate: maxSpeedOnSegments: allowHighway: engineSizeInCubicCentimeters: ) Creates a new instance.
Parameters
- routeOptions: Specifies the common route calculation options.
- textOptions: Customize textual content returned from the route calculation, such as localization, format, and unit system.
- avoidanceOptions: Options to specify restrictions for route calculations. By default no restrictions are applied.
- tollOptions: Options to specify how the tolls should be calculated, such as transponders, vehicle category, and emission type.
- occupantsNumber: Specifies the number of occupants in the vehicle, including driver. Shouldn’t be less than 1 or greater than 255. Defaults to 1. This option is only relevant for Japan and will be ignored for other countries.
- lastCharacterOfLicensePlate: Specifies the last character of a vehicle’s license plate, typically used to evaluate traffic restrictions in certain environmental or low-emission zones. In cities like Bogotá, Mexico City, or Jakarta, specific license plate digits may be restricted on certain days or in certain areas to reduce congestion and emissions. When this value is provided, the HERE SDK considers it during route calculation to avoid roads or areas where your vehicle may be restricted based on local regulations. Example usage: “7”, when the license plate of a vehicle looks like “B-ET-182487”.
If this value is not set, such license plate-based restrictions are ignored, and routing is performed without considering them.
- maxSpeedOnSegments: Segments with restriction on maximum
DynamicSpeedInfo.baseSpeedInMetersPerSecond. - allowHighway: Specifies whether scooter is allowed on highway or not.
Truemeans scooter is allowed to use highways andfalsemeans otherwise. By default it is set tofalse. Note that there is a similar parameter inAvoidanceOptions, to disallow highway usage, seeRoadFeatures.controlledAccessHighway. 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.- engineSizeInCubicCentimeters: Engine size of the scooter in cubic centimeters. Shouldn’t be less than 1 or greater than 65535. Default value
is
nil, which means the scooter route calculation ignores all engine size limits on the road.
Note: For now, this option is only relevant in Japan and will be ignored for other countries. Currently, map data for this option is only available for Japan.
Declaration
Swift
public init(routeOptions: RouteOptions = RouteOptions(), textOptions: RouteTextOptions = RouteTextOptions(), avoidanceOptions: AvoidanceOptions = AvoidanceOptions(), tollOptions: TollOptions = TollOptions(), occupantsNumber: Int32 = 1, lastCharacterOfLicensePlate: String? = nil, maxSpeedOnSegments: [MaxSpeedOnSegment] = [], allowHighway: Bool = false, engineSizeInCubicCentimeters: Int32? = nil)