Home > @magiclane/maps-sdk > MotorVehicleProfile

MotorVehicleProfile class

Motor vehicle profile.

Base class for motorized vehicle profiles such as CarProfile and TruckProfile. Provides common routing parameters used by the routing engine (mass, maximum speed and fuel type).

Routing

Signature:

export declare class MotorVehicleProfile extends VehicleRegistration 

Extends: VehicleRegistration

Constructors

Constructor

Modifiers

Description

(constructor)(options)

Creates a motor vehicle profile with sensible defaults.

Properties

Property

Modifiers

Type

Description

fuel

FuelType

Engine fuel type. Default is FuelType.petrol.

mass

number

Vehicle mass in kg. By default it is 0 and is not considered in routing.

maxSpeed

number

Vehicle maximum speed in m/s. By default it is 0 and is not considered in routing.

Methods

Method

Modifiers

Description

fromJson(json)

static

toJson()