The Routes API is currently in Preview (pre-GA). Pre-GA products and features might have limited support, and changes to pre-GA products and features might not be compatible with other pre-GA versions. Pre-GA Offerings are covered by the Google Maps Platform Service Specific Terms. For more information, see the launch stage descriptions.

Use the vehicle stopover qualifier

Stay organized with collections Save and categorize content based on your preferences.

To specify that a waypoint is a stop for a pickup or dropoff, use the vehicleStopover property of a waypoint, Waypoint (REST) or Waypoint (gRPC). This setting ensures that the calculated route won't begin or end on a road that is unsuitable for pickup and drop-off such as a highway or tunnel.

Consider the situation where a surface road crosses over a road inside a tunnel. If you were to specify a waypoint located where the two roads intersect (as seen on a map), then the resulting route would begin or end on either the surface road or the tunnel. This result presents a problem because you can't stop in tunnels to make pickups or drop-offs.

If you want to use the waypoint for a pickup or drop-off, then you could set the vehicleStopover field to true to ensure that the resulting route begins or ends on a road that allows pickups and drop-offs.

The following example demonstrates how to set the vehicleStopover property:

        "latitude": 37.419734,
        "longitude": -122.0827784
    "vehicleStopover": true