create

fun create(directionsResponse: DirectionsResponse, routeOptions: RouteOptions): List<NavigationRoute>

Creates new instances of NavigationRoute based on the routes found in the directionsResponse.

Should not be called from UI thread. Contains serialisation and deserialisation under the hood.

Parameters

directionsResponse

response to be parsed into NavigationRoutes

routeOptions

options used to generate the directionsResponse


fun create(    directionsResponse: DirectionsResponse,     routeOptions: RouteOptions,     routerOrigin: RouterOrigin): List<NavigationRoute>

Creates new instances of NavigationRoute based on the routes found in the directionsResponse.

Should not be called from UI thread. Contains serialisation and deserialisation under the hood.

Parameters

directionsResponse

response to be parsed into NavigationRoutes

routeOptions

options used to generate the directionsResponse

routerOrigin

origin where route was fetched from


fun create(directionsResponseJson: String, routeRequestUrl: String): List<NavigationRoute>

Creates new instances of NavigationRoute based on the routes found in the directionsResponseJson.

Should not be called from UI thread. Contains serialisation and deserialisation under the hood.

Parameters

directionsResponseJson

response to be parsed into NavigationRoutes

routeRequestUrl

URL used to generate the directionsResponse

Throws


fun create(    directionsResponseJson: String,     routeRequestUrl: String,     routerOrigin: RouterOrigin): List<NavigationRoute>

Creates new instances of NavigationRoute based on the routes found in the directionsResponseJson.

Should not be called from UI thread. Contains serialisation and deserialisation under the hood.

Parameters

directionsResponseJson

response to be parsed into NavigationRoutes

routeRequestUrl

URL used to generate the directionsResponse

routerOrigin

origin where route was fetched from

Throws