toDirectionsRoutes

fun List<NavigationRoute>.toDirectionsRoutes(): List<DirectionsRoute>

Returns all NavigationRoute.directionsRoutes.

This is a lossy mapping since the DirectionsRoute cannot carry the same amount of information as NavigationRoute.

Throws

when DirectionsRoute and RouteOptions don't contain enough data to create a new instance of NavigationRoute (required for forward compatibility). For instance, EV routing adds additional waypoints and metadata, to handle a route it requires original DirectionsResponse.