I'm getting in my directions as explained in the docs. My link looks like this:
https://maps.googleapis.com/maps/api/directions/json?origin=lat,lng&destination=lat,lng&mode=walking&key=KEY
Which works perfectly fine. However, it doesn't matter what origin or destination I set, I'm always getting a JSON file with a singe route. See the below screenshot:
Is this correct? Is there any way I can get multiples routes?
From the Directions API documentation
alternatives — If set to true, specifies that the Directions service may provide more than one route alternative in the response. Note that providing route alternatives may increase the response time from the server. This is only available for requests without intermediate waypoints.
You need to set the alternatives to get one or more routes from origin to destination.
In your case you may be try like this and see the output
https://maps.googleapis.com/maps/api/directions/json?origin=lat,lng&destination=lat,lng&mode=walking&key=KEY&alternatives=true