cursorSelectionTrafficEvents method
Retrieve the list of traffic events under the cursor location.
Traffic events can include incidents like accidents, roadworks, or traffic jams. This method is useful for applications that provide real-time traffic information and require user interaction with traffic events.
Use setCursorScreenPosition to set the cursor location.
Returns
A Path object under the cursor. If no path is found returns null.
Throws
- An exception if it fails.
Implementation
List<TrafficEvent> cursorSelectionTrafficEvents() {
final OperationResult resultString = objectMethod(
_pointerId,
'MapView',
'cursorSelectionTrafficEvents',
);
return TrafficEventList.init(resultString['result']).toList();
}