Home > @magiclane/maps-sdk > ElectricBikeProfile > (constructor)
ElectricBikeProfile.(constructor)
Creates an ElectricBikeProfile with optional values.
Constructs an instance with sensible defaults if specific values are not provided. The defaults model a typical pedelec with no masses or auxiliary consumption specified.
Signature:
constructor(options?: {
type?: ElectricBikeType;
bikeMass?: number;
bikerMass?: number;
auxConsumptionDay?: number;
auxConsumptionNight?: number;
ignoreLegalRestrictions?: boolean;
plateNumber?: string;
});Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
options |
{ type?: ElectricBikeType; bikeMass?: number; bikerMass?: number; auxConsumptionDay?: number; auxConsumptionNight?: number; ignoreLegalRestrictions?: boolean; plateNumber?: string; } |
(Optional) Configuration options |
options properties:
- Optional type?: ElectricBikeType
The e-bike drivetrain type. Defaults to ElectricBikeType.pedelec.
- Optional bikeMass?: number
The bike mass in kilograms. If 0, a default internal value may be used.
- Optional bikerMass?: number
The rider mass in kilograms. If 0, a default internal value may be used.
- Optional auxConsumptionDay?: number
Auxiliary power consumption during daytime in Watts. If 0, a default internal value may be used.
- Optional auxConsumptionNight?: number
Auxiliary power consumption during nighttime in Watts. If 0, a default internal value may be used.
- Optional ignoreLegalRestrictions?: boolean
When true, country-based legal restrictions related to e-bikes are ignored in routing.
- Optional plateNumber?: string
Vehicle plate number (inherited from VehicleRegistration).