@magiclane/maps-sdk
    Preparing search index...

    Class TruckProfile

    Truck routing profile.

    Profile used for truck/lorry routing that includes vehicle dimensions and axle/load constraints. These parameters are considered by the routing engine when calculating truck-compatible routes (bridges, height/weight limits, etc.).

    Make sure to specify accurate values for the truck dimensions as they are measured in centimetres.

    Hierarchy (View Summary)

    Index

    Constructors

    • Truck profile constructor with default diesel fuel type.

      Parameters

      • Optionaloptions: {
            axleLoad?: number;
            fuel?: FuelType;
            height?: number;
            length?: number;
            mass?: number;
            maxSpeed?: number;
            plateNumber?: string;
            width?: number;
        }

        Configuration options

        • OptionalaxleLoad?: number

          Axle load in kilograms (default 0).

        • Optionalfuel?: FuelType

          Engine fuel type (default FuelType.diesel).

        • Optionalheight?: number

          Truck height in centimetres (default 0).

        • Optionallength?: number

          Truck length in centimetres (default 0).

        • Optionalmass?: number

          Vehicle mass in kilograms (default 0).

        • OptionalmaxSpeed?: number

          Maximum speed in m/s (default 0).

        • OptionalplateNumber?: string

          Registration plate number (inherited).

        • Optionalwidth?: number

          Truck width in centimetres (default 0).

      Returns TruckProfile

    Properties

    axleLoad: number

    Truck axle load in kg. By default it is 0 and is not considered in routing.

    fuel: FuelType

    Engine fuel type. Default is FuelType.petrol.

    height: number

    Truck height in cm. By default it is 0 and is not considered in routing.

    length: number

    Truck length in cm. By default it is 0 and is not considered in routing.

    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.

    plateNumber: string = ''

    The vehicle's registration plate number.

    width: number

    Truck width in cm. By default it is 0 and is not considered in routing.

    Methods

    • Get hash code for use in maps/sets

      Returns number

    • Parameters

      • str: string

      Returns number

    • Internal

      Serializes this instance to a JSON-compatible map.

      Used internally, not intended for direct use by consumers. The map structure may change without notice.

      Returns Record<string, any>

      JSON-compatible map

    • Internal

      Deserializes a JSON-compatible map to create an instance.

      Used internally, not intended for direct use by consumers. The expected map structure may change without notice.

      Parameters

      • json: any

        JSON-compatible map

      Returns TruckProfile

      A new TruckProfile instance