Home > @magiclane/maps-sdk > RouteTrafficEvent

RouteTrafficEvent class

Route traffic events class

Signature:

export declare class RouteTrafficEvent extends TrafficEvent 

Extends: TrafficEvent

Constructors

Constructor

Modifiers

Description

(constructor)(id, mapId)

Constructs a new instance of the RouteTrafficEvent class

Properties

Property

Modifiers

Type

Description

distanceToDestination

readonly

number

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

from

readonly

Coordinates

Get the route traffic event start point.

fromLandmark

readonly

{ first: Landmark; second: boolean; }

Gets the traffic event start point as landmark.

to

readonly

Coordinates

Get the route traffic event end point.

toLandmark

readonly

{ first: Landmark; second: boolean; }

Gets the traffic event end point as landmark.

Methods

Method

Modifiers

Description

asyncUpdateToFromData(onCompleteCallback)

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

cancelUpdate()

Cancel the update request.

dispose()

init(id, mapId)

static