onBetterRouteFound abstract method
- Route newRoute,
- int etaDifferenceInSeconds,
- int distanceDifferenceInMeters
This event is issued when a better route could be found, as defined by DynamicRoutingEngineOptions.
To find a better route, two routes are calculated. The updated current route: A route that is calculated via the route specified. The dynamic route: A route that starts at the current position on the route specified and passes through the remaining waypoints.
-
newRouteThe newly calculated route with the remaining waypoints starting from the current location. -
etaDifferenceInSecondsThe difference in seconds: eta of the current updated route - eta of the dynamic route. -
distanceDifferenceInMetersThe difference in meters: distance of the current updated route - distance of the dynamic route. The value can be negative in case the current updated route has a shorter distance, but its now assumed to be longer than the dynamic route.
Implementation
void onBetterRouteFound(Route newRoute, int etaDifferenceInSeconds, int distanceDifferenceInMeters);