Reputation: 401
I'm using this URL to get JSON directions (and showing in on map using GMSPolyLine
):
https://maps.googleapis.com/maps/api/directions/json?&origin=%@&destination=%@&sensor=false
But the result it returns me is for driving and I want the user to choose between walking and driving.
Can anyone give me the URL for walking/choosing from walking or driving?
Thank you very much!
Upvotes: 0
Views: 1737
Reputation: 117324
Set a URL-parameter mode
to the value walking
https://maps.googleapis.com/maps/api/directions/json?&origin=%@&destination=%@&mode=walking
https://developers.google.com/maps/documentation/directions/intro#TravelModes
Upvotes: 3