getTrafficEvents

Synchronously retrieves traffic events in the area specified by the provided GeoBoundingBox. If the call succeeds, returns a TrafficEventsResult. If it fails, returns a TrafficError.

Return

If the call succeeds, returns a TrafficEventsResult. If it fails, returns a TrafficError.

Parameters

boundingBox

The area in which to retrieve the traffic events.


abstract fun getTrafficEvents(boundingBox: GeoBoundingBox, callback: TrafficEventsCallback): Cancellable

Asynchronously retrieves traffic events in the area specified by the provided GeoBoundingBox object and returns the result in the TrafficEventsCallback.

Important: This is a Public Preview API. It may be changed or removed at any time.

Return

cancellable operation.

Parameters

boundingBox

The area in which to retrieve the traffic events.

callback

The TrafficEventsCallback invoked once all traffic events in the area have been retrieved, either successfully or with an error. The callback will be executed on the main thread.