Sorry, you need to enable JavaScript to visit this website.

Routing with alternative routes

Routing with alternative routes

Allow your users to check different routing alternatives so they can choose the one they prefer.

Sample use case: You are preparing a road trip and you would like to see different route options so you can choose one that is both optimal for your trip and suits your road trip preferences.

In the following example you can see an implementation of alternative routes using a clickable route object. Click on the route to get its ETA and the distance between its origin and destination.

To request a route with alternatives:


RouteQuery queryBuilder = RouteQueryBuilder.create(routeConfig.getOrigin(), routeConfig.getDestination())
val routeQuery = RouteQueryBuilder.create(origin, destination)

One alternative route


Three alternative routes


Five alternative routes

You are here