RouteTrafficEvent class
Represents a traffic event affecting a computed Route.
Encapsulates information about a specific traffic condition or incident (for example, congestion, roadworks, or closures) that impacts a route.
Requires that the route was computed with traffic data enabled. Use the RouteBase.trafficEvents getter to obtain the list of events for a given route.
See also:
- TrafficEvent - Base class for traffic events.
- RouteBase.trafficEvents - Getter that returns the traffic events for a route.
- Inheritance
-
- Object
- TrafficEvent
- RouteTrafficEvent
Properties
- affectedTransportModes → RouteTransportMode
-
Transport modes affected by this event.
no setterinherited
- area → GeographicArea
-
Geographic area associated with the event.
no setterinherited
- boundingBox → RectangleGeographicArea
-
Bounding box that encloses the event geometry.
no setterinherited
- delay → int
-
Estimated delay introduced by the traffic event.
no setterinherited
- description → String
-
Human readable description of the traffic event.
no setterinherited
- distanceToDestination → int
-
Distance (in meters) from the event position on the current route to the destination.
no setter
- endTime → DateTime?
-
Event end time in UTC.
no setterinherited
- eventClass → TrafficEventClass
-
Classification of the traffic event.
no setterinherited
- eventSeverity → TrafficEventSeverity
-
Severity level of the traffic event.
no setterinherited
- from → Coordinates
-
Start coordinate of the traffic event on the route.
no setter
- fromLandmark → (Landmark, bool)
-
Start point represented as a Landmark and a cached-data flag.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasOppositeSibling → bool
-
Whether a corresponding event exists in the opposite direction.
no setterinherited
- hasRegisteredAutoReleaseObject ↔ bool
-
getter/setter pairinherited
- img → Img
-
Get the image as a Img.
no setterinherited
- impactZone → TrafficEventImpactZone
-
Impact zone type for the event.
no setterinherited
- isActive → bool
-
Whether this event is currently active (started).
no setterinherited
- isAntiArea → bool
-
Whether an area-based event is an anti-area.
no setterinherited
- isExpired → bool
-
Whether this event is expired (ended).
no setterinherited
- isRoadblock → bool
-
Whether this traffic event represents a roadblock.
no setterinherited
- isUserRoadblock → bool
-
Whether the traffic event was created by the user.
no setterinherited
- length → int
-
Length in meters of the affected road segment.
no setterinherited
- pointerId → int
-
The pointer ID of the native object
no setterinherited
- previewUrl → String
-
URL for a web preview of the traffic event.
no setterinherited
- referencePoint → Coordinates
-
Central reference point for the event.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startTime → DateTime?
-
Event start time in UTC.
no setterinherited
- to → Coordinates
-
End coordinate of the traffic event on the route.
no setter
- toLandmark → (Landmark, bool)
-
End point represented as a Landmark and a cached-data flag.
no setter
Methods
-
asyncUpdateToFromData(
void onComplete(GemError err)) → void - Asynchronously fetch and update full fromLandmark and toLandmark details from the server.
-
cancelGetPreviewData(
ProgressListener listener) → void -
Cancel an active preview data request started with getPreviewData.
inherited
-
cancelUpdate(
) → void - Cancel a pending asyncUpdateToFromData request.
-
dispose(
) → void -
Disposes the native object.
inherited
-
getImage(
{Size? size, ImageFileFormat? format}) → Uint8List? -
Retrieves an image representing the traffic event.
inherited
-
getPreviewData(
void onResult(GemError error, TrafficParameters? data)) → ProgressListener? -
Asynchronously retrieve traffic preview data for the event.
inherited
-
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