CalculateTrafficOnRouteCallback (API Reference)
Interface CalculateTrafficOnRouteCallback
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A function which is called by the RoutingEngine after route traffic calculation has completed.
It is always called on the main thread.
The first argument is the error in case of a failure. It is null for an operation that succeeds.
The second argument is the calculated route traffic. It is null in case of an error.
-
Method Summary
Modifier and TypeMethodDescriptionvoidonTrafficOnRouteCalculated(RoutingError routingError, TrafficOnRoute trafficOnRoute) A function which is called by the RoutingEngine after route traffic calculation has completed.
-
Method Details
-
onTrafficOnRouteCalculated
void onTrafficOnRouteCalculated(@Nullable RoutingError routingError, @Nullable TrafficOnRoute trafficOnRoute) A function which is called by the RoutingEngine after route traffic calculation has completed. It is always called on the main thread. The first argument is the error in case of a failure. It is
nullfor an operation that succeeds. The second argument is the calculated route traffic. It isnullin case of an error.- Parameters:
routingError-The error in case of a failure. It is
nullfor an operation that succeeds.trafficOnRoute-The calculated route traffic. It is
nullin case of an error.
-