Allow your user to reconstruct his/her route using supporting points. Supporting points
can be combined with minDeviationDistance or minDeviationTime constraints. When these constraints are used,
the alternative routes will follow the reference route from the origin point for the given time or distance.
In other words, alternative routes just diverge from the reference route after the given constraints.
When using supporting points, intermediate locations (waypoints) are not supported.
Sample use case: You have route coordinates saved on your device.
You want to reconstruct the route based on the coordinates (supporting points)
and calculate zero or more alternative routes to this reference route.
To request a route with supporting points support:
RouteQuery queryBuilder = RouteQueryBuilder.create(EXAMPLE_ORIGIN, EXAMPLE_DESTINATION) .withMaxAlternatives(1) .withMinDeviationTime(0) .withSupportingPoints(SUPPORTING_POINTS) .withMinDeviationDistance(minDeviationDistance) .withConsiderTraffic(false) .build();
val routeQuery = RouteQueryBuilder.create(origin, destination) .withMaxAlternatives(MAX_ALTERNATIVES) .withMinDeviationTime(MIN_DEVIATION_TIME) .withSupportingPoints(SUPPORTING_POINTS) .withMinDeviationDistance(minDeviationDistance) .withConsiderTraffic(false) .build()
Min. deviation distance: 0 m
Min. deviation distance: 10 km