android google maps walking directions

722 views Asked by At

I am developing an android application using google maps api v2. The problem is google maps shows directions depending upon the road routes even if it is a open ground. For example, take these two LatLng LatLng1 : -33.891143, 151.224473 LatLng2 : -33.891580, 151.225336

https://i.stack.imgur.com/Xt0Ox.png

But I want to show a straight direction as it is an open ground. I am using JSON for fetching directions (transit, walking, driving) like http://maps.googleapis.com/maps/api/directions/json?origin=-33.891143, 151.224473&destination=-33.891580, 151.225336&sensor=false&units=metric&mode=transit

Is there any way possible to do this? Thanks in advance

1

There are 1 answers

0
kaho On BEST ANSWER

I think Google Maps just doesn't know that you can walk over.

enter image description here

a workaround would be to draw a simple polyline between the two points if they are close to each other, and if they are both open ground.