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

    Class ElectricBikeProfile

    Electric bike profile containing e-bike configuration and rider/vehicle parameters.

    Holds electric bike specific routing parameters used by the routing engine to estimate energy consumption, apply legal constraints, and tune route generation for e-bike capabilities.

    Hierarchy (View Summary)

    Index

    Constructors

    • 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.

      Parameters

      • Optionaloptions: {
            auxConsumptionDay?: number;
            auxConsumptionNight?: number;
            bikeMass?: number;
            bikerMass?: number;
            ignoreLegalRestrictions?: boolean;
            plateNumber?: string;
            type?: ElectricBikeType;
        }

        Configuration options

        • OptionalauxConsumptionDay?: number

          Auxiliary power consumption during daytime in Watts. If 0, a default internal value may be used.

        • OptionalauxConsumptionNight?: number

          Auxiliary power consumption during nighttime in Watts. If 0, a default internal value may be used.

        • OptionalbikeMass?: number

          The bike mass in kilograms. If 0, a default internal value may be used.

        • OptionalbikerMass?: number

          The rider mass in kilograms. If 0, a default internal value may be used.

        • OptionalignoreLegalRestrictions?: boolean

          When true, country-based legal restrictions related to e-bikes are ignored in routing.

        • OptionalplateNumber?: string

          Vehicle plate number (inherited from VehicleRegistration).

        • Optionaltype?: ElectricBikeType

          The e-bike drivetrain type. Defaults to ElectricBikeType.pedelec.

      Returns ElectricBikeProfile

    Properties

    auxConsumptionDay: number

    Auxiliary power consumption during day in Watts.

    If zero, a default internal value may be applied by routing logic.

    auxConsumptionNight: number

    Auxiliary power consumption during night in Watts.

    If zero, a default internal value may be applied by routing logic.

    bikeMass: number

    Bike mass in kilograms.

    If zero, a default internal value may be applied by routing logic.

    bikerMass: number

    Rider (biker) mass in kilograms.

    If zero, a default internal value may be applied by routing logic.

    ignoreLegalRestrictions: boolean

    Ignore country-based legal restrictions related to e-bikes.

    When true, routing will not apply jurisdiction-specific constraints for e-bike classification.

    plateNumber: string = ''

    The vehicle's registration plate number.

    Ebike drivetrain type. Default is ElectricBikeType.pedelec.

    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 ElectricBikeProfile

      A new ElectricBikeProfile instance