EVTruckOptions
public struct EVTruckOptions : Hashable
All the options to specify how a route for an electric truck 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 -
The options explicitly allowed by user for route calculations. By default no options are opt in.
Declaration
Swift
public var allowOptions: AllowOptions -
Specifies the number of occupants in the vehicle, including driver, can affect the vehicle’s ability to use HOV/carpool restricted lanes. Shouldn’t be less than 1 or greater than 255. Defaults to 1.
Note: This parameter has no effect unless HOV and/or HOT lane usage is enabled via
EVTruckOptions.allowOptionsand such lanes are available in the selected country.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] -
Detailed truck specifications such as dimensions and weight.
Declaration
Swift
public var truckSpecifications: TruckSpecifications -
Specifies the tunnel categories to restrict certain route links. The route will pass only through tunnels of a less strict category. Refer to
TunnelCategoryfor the available options.Declaration
Swift
public var linkTunnelCategory: TunnelCategory? -
Specifies a list of hazardous materials shipped in the vehicle. Refer to
HazardousMaterialfor the available options.Declaration
Swift
public var hazardousMaterials: [HazardousMaterial] -
Specifies a list of avoided truck road types for vehicle. Refer to
TruckRoadTypefor the available options.Declaration
Swift
public var avoidedTruckRoadTypes: [TruckRoadType] -
Vehicle specific parameters, which are then used to calculate energy consumption for the vehicle on a given route.
Declaration
Swift
public var consumptionModel: EVConsumptionModel -
init(routeOptions:textOptions: avoidanceOptions: tollOptions: allowOptions: occupantsNumber: lastCharacterOfLicensePlate: maxSpeedOnSegments: truckSpecifications: linkTunnelCategory: hazardousMaterials: avoidedTruckRoadTypes: consumptionModel: ) 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.
- allowOptions: The options explicitly allowed by user for route calculations. By default no options are opt in.
- occupantsNumber: Specifies the number of occupants in the vehicle, including driver, can affect the vehicle’s ability to use HOV/carpool restricted lanes. Shouldn’t be less than 1 or greater than 255. Defaults to 1.
Note: This parameter has no effect unless HOV and/or HOT lane usage is enabled via
EVTruckOptions.allowOptionsand such lanes are available in the selected country.- 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. - truckSpecifications: Detailed truck specifications such as dimensions and weight.
- linkTunnelCategory: Specifies the tunnel categories to restrict certain route links.
The route will pass only through tunnels of a less strict category.
Refer to
TunnelCategoryfor the available options. - hazardousMaterials: Specifies a list of hazardous materials shipped in the vehicle.
Refer to
HazardousMaterialfor the available options. - avoidedTruckRoadTypes: Specifies a list of avoided truck road types for vehicle.
Refer to
TruckRoadTypefor the available options. - consumptionModel: Vehicle specific parameters, which are then used to calculate energy consumption for the vehicle on a given route.
Declaration
Swift
public init(routeOptions: RouteOptions = RouteOptions(), textOptions: RouteTextOptions = RouteTextOptions(), avoidanceOptions: AvoidanceOptions = AvoidanceOptions(), tollOptions: TollOptions = TollOptions(), allowOptions: AllowOptions = AllowOptions(), occupantsNumber: Int32 = 1, lastCharacterOfLicensePlate: String? = nil, maxSpeedOnSegments: [MaxSpeedOnSegment] = [], truckSpecifications: TruckSpecifications = TruckSpecifications(), linkTunnelCategory: TunnelCategory? = nil, hazardousMaterials: [HazardousMaterial] = [], avoidedTruckRoadTypes: [TruckRoadType] = [], consumptionModel: EVConsumptionModel = EVConsumptionModel())