Search code examples
androidgoogle-mapsdriving-directions

Step by Step Driving instructions using google maps API v2 and directions API?


I have created an app which has a navigation drawer listing possible destinations. By selecting one of the destinations, the starting location is obtained using location manager, and the destination location is hardcoded. I can successfully draw polyline between the origin and destination by obtaining JSON output from the url. What I want now is I put a couple of textviews in the botton to show step by step instructions like turn right here, turn left there. Is there any way to obtain this information using the above given APIs?

I tried to search All I get is how to draw polyline from parsed data.


Solution

  • Try this http://maps.googleapis.com/maps/api/directions/json?origin=5th%20Ave&destination=Times%20Square&mode=bicycling&sensor=false

    Here ,in the json response there is a tag:maneuver you can use this for your need