optimizeTrip

fun optimizeTrip(routePlan: RoutePlan, listener: TripOptimizerListener, searchMode: SearchMode = SearchMode.BEST, tripMode: TripMode = TripMode.TO_FIXED_STOP_TRIP)

Optimizes a RoutePlan's waypoints to have a faster/shorter route.

Parameters

routePlan

that contains info for the route optimization and RouteOptions. It must only contain one RoutePlan.departures point and one RoutePlan.destinations (and any number of RoutePlan.viaPoints).

listener

callback for getting optimization's result

searchMode

search speed mode, see SearchMode enum.

tripMode

trip mode, see TripMode enum.