androidgoogle-mapsdirections

How to have Heading considered for Google Directions API?


I have been looking at the documentation for Google Directions because while using this API I am noticing that my turn by turn directions are not always accurate. For example, I will receive instructions to "turn Right" on a street, when I need to first make a U-Turn. Instead of inserting the U-Turn manually, I was wondering if there is a way to use heading for Google Directions? From their documentation, the answer seems to be no.

https://developers.google.com/maps/documentation/directions/

I thought about possibly including waypoints, but still heading is not used. So instructions are not accurate.

https://maps.googleapis.com/maps/api/directions/json?origin=45.509166,-73.497897&destination=50.5027,-73.503455&waypoints=optimize:true|45.509196,-73.495494|45.511166,-73.493584|45.515887,-73.500751|45.516835,-73.507189|45.51497,-73.514892|45.507828,-73.515879|45.504038,-73.516008|45.508971,-73.505665|&sensor=false&API_KEY

This makes me ponder the question, how does Google determine turn by turn instructions without taking heading into consideration?


Solution

  • You are right currently this is not possible with Directions API. There is a feature request in the public issue tracker:

    https://issuetracker.google.com/issues/35824456

    Feel free to star the issue to add your vote and subscribe to further updates from Google.