I am working on an app in which I have to show shortest route. I am using Google Direction API but the result is different from Google Maps app for same destination and travel mode.
Since alternative is true I am already using shortest route from available routes (response).
Note : - When I enter lat lng of origin and destination in the map app it shows same result. It shows different result only when we type the origin and destination.
I got the solution. When I put destination place_id instead of lat lng it is showing same result as google map app. I don't know how it is working. Such variation not even mentioned in developer docs.
来源:https://stackoverflow.com/questions/54269684/google-direction-api-and-google-maps-app-showing-different-routes-for-same-desti