In certain places, it's not possible for drivers to stop safely (for example,
elevated areas, ferries, underground locations, and other areas of limited
access). The Stopover feature relocates the waypoint to a nearby place if
its location is not suitable for a vehicle to make a stop. When you set
setVehicleStopover
to true
, the waypoint is automatically relocated when
the route is calculated, if an alternate location is available.
How it works
You set the preference for a stopover when creating the waypoint for that stop.
To do this, specify the setVehicleStopover
preference as shown in the
following example:
Waypoint waypoint =
Waypoint.builder()
.setLatLng(latitude, longitude)
.setTitle("Somewhere in Sydney")
.setVehicleStopover(true)
.build()