Search code examples
androidgoogle-mapsgoogle-directory-api

How to get and draw multiple path between two location using google distance api?


I am working on a project in which, user chooses two location and i have to show multiple path between chosen location.

FYI :- Currently i am able to find a single path and draw them, I am using this link to find single path to draw https://maps.googleapis.com/maps/api/directions/json?origin=28.629074,77.37911&destination=28.459496499999997,77.0266383&sensor=false&alternative=true&mode=driving

Please suggest us how to find multiple path to draw.

Thank You.


Solution

  • I did it, What i was doing wrong is my URL was containing "alternative=true" while it has to be "alternatives=true" Such a stupid mistake.