Routes with multiple stops
Implement Using: Directions Fast API
In this example, we will configure a request with multiple waypoints or stops that need to be made before the final destination. We will add 3 location coordinates which should be visited before the route ends at the destination location. To accomplish this we configure:
origin
to denote the starting point of the tripwaypoints
with location coordinates of 3 stopsdestination
to denote the end point of the tripmode
set to “car” to get a route which a car can take
Request
Response
Following is a visual representation of the above route on a map. We can observe that the route passes through all the given stops before arriving at the destination.