title: How do I draw a route, along an existing road, between two points?
body: <p>I want to show the driving route between two locations in my android app. I want to draw the route only on top of road segments.</p>
  
  <p>There are several answers on stack overflow itself, and all of them were using the same method. Get the directions from start point to destination using google directions API, and draw a polyline across the points returned. Following are some of the answers which uses this method.</p>
  
  <p><a href="https://stackoverflow.com/a/17007360/1015678">https://stackoverflow.com/a/17007360/1015678</a></p>
  
  <p><a href="https://stackoverflow.com/a/40563930/1015678">https://stackoverflow.com/a/40563930/1015678</a></p>
  
  <p>But, problem with above method is, when the roads are not straight, the dawn rote is not always on top of the roads, because directions API only returns points where you need to turn from one road to another (at junctions). It doesn't give point details in the bends of the same road segment. So, when I use above method in an area where the roads have so many bends, the route drawn almost always is not on top of road segments.</p>
  
  <p>I found <a href="https://stackoverflow.com/a/27343990/1015678">this</a> answer, which does what I need to do, using the javascript API. In this solution, the drawn route nicely follows the roads, similar to the google maps android app. Does someone know whether this is achievable in an android app?</p>
  
  <p>Google Maps android app can nicely draw a route from one point to another, keeping the route on the roads. Does anyone know how Google Maps is doing this? Is it using any other API which is not publicly exposed?</p>