Truck
public struct Truck : Vehicle, Motorized, CargoCapable, InternalConformanceLocked
A vehicle of type truck.
Note
This option is not yet supported with the Orbis map.Important
This is a Public Preview API. It may be changed or removed at any time.-
init(maxSpeed:generalLoadType: dangerousGoodsLoadType: isCommercial: combustionEngine: electricEngine: dimensions: loadType: adrTunnelRestrictionCode: modelID: ) Creates truck.
Declaration
Swift
public init( maxSpeed: Measurement<UnitSpeed>? = nil, generalLoadType: Set<VehicleGeneralLoadType>? = nil, dangerousGoodsLoadType: Set<VehicleDangerousLoadType>? = nil, isCommercial: Bool = true, combustionEngine: CombustionEngine? = nil, electricEngine: ElectricEngine? = nil, dimensions: VehicleDimensions? = nil, loadType: Set<VehicleLoadType> = [], adrTunnelRestrictionCode: ADRTunnelRestrictionCode? = nil, modelID: VehicleModelID? = nil )Parameters
maxSpeedSpecifies max truck speed.
generalLoadTypeSpecifies the list of vehicle general load types.
dangerousGoodsLoadTypeSpecifies the list of vehicle dangerous goods load types.
isCommercialIf true, the vehicle is used for commercial purposes and thus may not be allowed to drive on some roads.
combustionEngineThe vehicle’s combustion engine.
electricEngineThe vehicle’s electric engine.
dimensionsThe vehicle’s dimensions.
loadTypeThe hazardous materials class of the vehicle’s load.
adrTunnelRestrictionCodeADR tunnel restriction code of the vehicle.
modelIDSpecifies the Model ID of the vehicle as obtained from the TomTom Vehicle Database. It allows planning an EV route without specifying the vehicle’s consumption and charging parameters.
-
Specifies the list of vehicle general load types.
Declaration
Swift
public var generalLoadType: Set<VehicleGeneralLoadType>? -
Specifies the list of vehicle dangerous goods load types.
Declaration
Swift
public var dangerousGoodsLoadType: Set<VehicleDangerousLoadType>? -
If true, the vehicle is used for commercial purposes and thus may not be allowed to drive on some roads.
Declaration
Swift
public var isCommercial: Bool -
The vehicle’s combustion engine.
Declaration
Swift
public var combustionEngine: CombustionEngine? -
The vehicle’s electric engine.
Declaration
Swift
public var electricEngine: ElectricEngine? -
The vehicle’s dimensions for route calculation.
Declaration
Swift
public var dimensions: VehicleDimensions? -
The hazardous materials class of the vehicle’s load.
Declaration
Swift
public var loadType: Set<VehicleLoadType> -
ADR tunnel restriction code of the vehicle.
Declaration
Swift
public var adrTunnelRestrictionCode: ADRTunnelRestrictionCode? -
Specifies the Model ID of the vehicle as obtained from the TomTom Vehicle Database. It allows planning an EV route without specifying the vehicle’s consumption and charging parameters.
Declaration
Swift
public var modelID: VehicleModelID? -
Specifies the max speed of the vehicle.
Declaration
Swift
public let maxSpeed: Measurement<UnitSpeed>? -
Specifies the vehicle type.
Declaration
Swift
public let type: VehicleType
Truck Structure Reference