Bus
A vehicle of type bus.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Declaration
Swift
public init( maxSpeed: Measurement<UnitSpeed>? = nil, isCommercial: Bool = true, combustionEngine: CombustionEngine? = nil, electricEngine: ElectricEngine? = nil, dimensions: VehicleDimensions? = nil, modelID: String? = nil )
Parameters
maxSpeed
Specifies max bus speed.
isCommercial
If true, the vehicle is used for commercial purposes and thus may not be allowed to drive on some roads.
combustionEngine
The vehicle’s combustion engine for route and consumption calculation.
electricEngine
The vehicle’s electric engine for route and consumption calculation.
dimensions
The vehicle’s dimensions for route calculation.
modelID
Specifies the Model ID of the vehicle as obtained from the TomTom Vehicle Database. It allows calculating an EV route without specifying the vehicle’s consumption and charging parameters.
-
If true, the vehicle is used for commercial purposes and thus may not be allowed to drive on some roads.
Declaration
Swift
public let isCommercial: Bool
-
The vehicle’s combustion engine for route and consumption calculation.
Declaration
Swift
public let combustionEngine: CombustionEngine?
-
The vehicle’s electric engine for route and consumption calculation.
Declaration
Swift
public let electricEngine: ElectricEngine?
-
The vehicle’s dimensions for route calculation.
Declaration
Swift
public let dimensions: VehicleDimensions?
-
Specifies the Model ID of the vehicle as obtained from the TomTom Vehicle Database. It allows calculating an EV route without specifying the vehicle’s consumption and charging parameters.
Declaration
Swift
public let modelID: String?
-
Copies the current Bus with changes specified in build closure
Declaration
Swift
public func copy(build: (inout Builder) -> ()) -> Bus
Parameters
build
This closure allows for change of Bus values
Return Value
Bus with the changes set on the closure
-
The
Builder
creates a new instance ofBus
with modified fields.Declaration
Swift
public struct Builder