TrafficLayer class abstract
A layer with traffic information.
- Implemented types
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
-
addTrafficListener(
TrafficListener trafficListener) → void - Adds a traffic listener.
-
isTrafficVisible(
) → bool - Checks if traffic is visible.
-
isValid(
) → bool - Usable only in runWithBlockUi or listener handlers.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeTrafficListener(
TrafficListener trafficListener) → void - Removes a traffic listener.
-
resetTrafficStyles(
) → void - Resets all JSON style transformations applied to the traffic layer.
-
setTrafficStyle(
String style) → bool - Applies JSON style transformations to the traffic layer. Same as setTrafficStyle(0, style). Set to empty string to clear previous styling. Returns true if the style was successfully parsed; false otherwise. If the return value is false, the current traffic style remains unchanged.
-
setTrafficStyleWithId(
{required int id, required String style}) → bool - Applies JSON style transformations to the traffic layer. Replaces previous styling with the specified ID (if such exists). Stylings are applied in an ascending order. Set to empty string to clear previous styling with the specified ID. Returns true if the style was successfully parsed; false otherwise. If the return value is false, the current traffic style remains unchanged.
-
setTrafficVisible(
bool on) → void - Sets traffic visibility.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited