TrafficEvent class Traffic & Roadblocks

Represents a traffic event such as congestion, roadworks or closures.

Represents a single traffic occurrence such as a delay, closure or user-defined roadblock. Instances are provided by the SDK in several contexts:

Do not instantiate this class directly. Use API entry points such as the GemMapController.registerOnCursorSelectionUpdatedOverlayItems listener or RouteBase.trafficEvents to obtain instances.

A TrafficEvent exposes metadata about the event (description, severity, class), spatial information (reference point, bounding box or area) and timing (start and end timestamps). For user-defined roadblocks the description may contain the user-provided id.

See also:

Implementers

Properties

affectedTransportModes → RouteTransportMode
Transport modes affected by this event.
no setter
area → GeographicArea
Geographic area associated with the event.
no setter
boundingBox → RectangleGeographicArea
Bounding box that encloses the event geometry.
no setter
delay → int
Estimated delay introduced by the traffic event.
no setter
description → String
Human readable description of the traffic event.
no setter
endTime → DateTime?
Event end time in UTC.
no setter
eventClass → TrafficEventClass
Classification of the traffic event.
no setter
eventSeverity → TrafficEventSeverity
Severity level of the traffic event.
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasOppositeSibling → bool
Whether a corresponding event exists in the opposite direction.
no setter
hasRegisteredAutoReleaseObject ↔ bool
getter/setter pairinherited
img → Img
Get the image as a Img.
no setter
impactZone → TrafficEventImpactZone
Impact zone type for the event.
no setter
isActive → bool
Whether this event is currently active (started).
no setter
isAntiArea → bool
Whether an area-based event is an anti-area.
no setter
isExpired → bool
Whether this event is expired (ended).
no setter
isRoadblock → bool
Whether this traffic event represents a roadblock.
no setter
isUserRoadblock → bool
Whether the traffic event was created by the user.
no setter
length → int
Length in meters of the affected road segment.
no setter
pointerId → int
The pointer ID of the native object
no setterinherited
previewUrl → String
URL for a web preview of the traffic event.
no setter
referencePoint → Coordinates
Central reference point for the event.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
startTime → DateTime?
Event start time in UTC.
no setter

Methods

cancelGetPreviewData(ProgressListener listener) → void
Cancel an active preview data request started with getPreviewData.
dispose() → void
Disposes the native object.
inherited
getImage({Size? size, ImageFileFormat? format}) → Uint8List?
Retrieves an image representing the traffic event.
getPreviewData(void onResult(GemError error, TrafficParameters? data)) → ProgressListener?
Asynchronously retrieve traffic preview data for the event.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerAutoReleaseObject(int pointerId) → void
Registers an object for auto release.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited