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

    Class RouteTrafficEvent

    Route traffic events class

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _mapId: number
    _pointerId: number

    Accessors

    • get delay(): number

      Gets the estimated delay in seconds caused by the traffic event.

      Returns number

      The delay in seconds. Returns -1 if the delay is unknown.

    • get description(): string

      Gets the traffic event description

      Returns string

      The description

    • get distanceToDestination(): number

      Get the distance in meters from starting point on current route of the traffic event to the destination.

      Returns number

      The distance in meters if a route is available, otherwise 0.

    • get endTime(): Date | null

      Gets end time (UTC)

      Returns Date | null

      The end time if it is available, otherwise null.

    • get eventClass(): TrafficEventClass

      Gets the traffic event class

      Returns TrafficEventClass

      The event class

    • get from(): Coordinates

      Get the route traffic event start point.

      Returns Coordinates

      The start point, Coordinates object

    • get fromLandmark(): { first: Landmark; second: boolean }

      Gets the traffic event start point as landmark.

      Returns { first: Landmark; second: boolean }

      The pair of <Landmark, data locally cached flag>

    • get hasOppositeSibling(): boolean

      Checks if event has a sibling on opposite direction

      Returns boolean

      True if the event has a sibling on opposite direction, false otherwise.

    • get isRoadblock(): boolean

      Checks if this traffic event is a roadblock.

      Returns boolean

      True if the traffic event is a roadblock.

    • get isUserRoadblock(): boolean

      Return true if the traffic event is a user roadblock

      Returns boolean

      True if the traffic event is a user roadblock, false otherwise.

    • get length(): number

      Gets the length in meters of the road segment affected by the traffic event.

      Returns number

      The length in meters.

    • get mapId(): number

      Returns number

    • get pointerId(): number

      Returns number

    • get previewUrl(): string

      Gets the traffic event preview URL

      Returns string

      The preview URL

    • get referencePoint(): Coordinates

      Gets the traffic event reference point

      Returns Coordinates

      The reference point

    • get startTime(): Date | null

      Gets start time (UTC)

      Returns Date | null

      The start time if it exists, otherwise null.

    • get to(): Coordinates

      Get the route traffic event end point.

      Returns Coordinates

      The end point, Coordinates object

    • get toLandmark(): { first: Landmark; second: boolean }

      Gets the traffic event end point as landmark.

      Returns { first: Landmark; second: boolean }

      The pair of <Landmark, data locally cached flag>

    Methods

    • Update the local data needed for 'from' and 'to' landmarks address and description.

      Parameters

      • onCompleteCallback: (err: GemError) => void

        The callback that completes with the result of the operation.

      Returns void

    • Cancel the update request.

      Returns void

    • Gets the traffic event image

      Parameters

      • Optionalsize: { height: number; width: number }

        The size of the image

      • Optionalformat: ImageFileFormat

        The image file format

      Returns Uint8Array<ArrayBufferLike> | null

      The traffic event image as Uint8Array or null

    • Registers an object for auto release. When the object is not used anymore, it will be released automatically from C++.

      Parameters

      • pointerId: any

        The pointer ID to register

      Returns void