TrafficService class abstract
Provides access to traffic-related services and user roadblock management.
This static API exposes operations to add, remove and query user-defined roadblocks, retrieve traffic service preferences and transfer statistics, and obtain online service restrictions for a geographic position.
See also:
- TrafficPreferences - Traffic service preferences
- TrafficEvent - Traffic event representation
- TrafficOnlineRestrictions - Online traffic service restrictions
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- persistentRoadblockListener ← PersistentRoadblockListener
-
Sets a listener to receive updates about persistent roadblocks.
no getter
-
persistentRoadblocks
→ List<
TrafficEvent> -
Returns all persistent user roadblocks managed by the traffic service.
no setter
- preferences → TrafficPreferences
-
Traffic service preferences accessor.
no setter
- transferStatistics → TransferStatistics
-
Data transfer statistics for the traffic service.
no setter
Static Methods
-
addAntiPersistentRoadblockByArea(
{required GeographicArea area, required DateTime startTime, required DateTime expireTime, required RouteTransportMode transportMode, required String id}) → (TrafficEvent?, GemError) - Adds a user-defined persistent anti-area roadblock.
-
addPersistentRoadblockByArea(
{required GeographicArea area, required DateTime startTime, required DateTime expireTime, required RouteTransportMode transportMode, required String id}) → (TrafficEvent?, GemError) - Adds a user-defined persistent roadblock covering a geographic area.
-
addPersistentRoadblockByCoordinates(
{required List< Coordinates> coords, required DateTime startTime, required DateTime expireTime, required RouteTransportMode transportMode, required String id}) → (TrafficEvent?, GemError) - Adds a user-defined persistent roadblock using a list of coordinates.
-
getOnlineServiceRestrictions(
Coordinates coords) → TrafficOnlineRestrictions - Retrieves online traffic service restrictions for a position.
-
getPersistentRoadblock(
String id) → TrafficEvent? - Retrieves a persistent roadblock by its identifier.
-
getPersistentRoadblockPathPreview(
{required UserRoadblockPathPreviewCoordinate from, required Coordinates to, required RouteTransportMode transportMode}) → (List< Coordinates> , UserRoadblockPathPreviewCoordinate, GemError) - Returns a preview of a persistent roadblock path between two coordinates.
-
removeAllPersistentRoadblocks(
) → void - Removes all user-defined persistent roadblocks.
-
removePersistentRoadblockByCoordinates(
Coordinates coords) → GemError - Removes a persistent roadblock identified by its reference coordinate.
-
removePersistentRoadblockById(
String id) → GemError - Removes a previously created persistent roadblock by its identifier.
-
removeUserRoadblock(
TrafficEvent event) → void - Removes a user-defined roadblock, whether persistent or not.