How to get road coordinates between two markers google map api

1.3k Views Asked by At

I need to create path exactly according to road coordinates from google map api.I am partially successful with the help of this "http://maps.googleapis.com/maps/api/directions/json?&origin=%@,%@&destination=%@,%@&sensor=false" service.

But this service provide me the coordinates as show in this image .Map without zooming

When we zoom this path it looks like this image .Map with zoom

Actually, I want to get exactly road coordinates with every curve.

Firstly I did this task with the javascript file which was in one of the tutorial of google map (SBMapwithRoute)but don't know why that javascript file stop responding now. If any body know how this task will perform than please help me.Thank you

1

There are 1 best solutions below

14
On

I have posted one artical on my blog may be help full check it

http://www.jogendra.com/wayPath

May be hellfull for you

if you wants get waypoints from your google maps waypath. then use this

 NSMutableArray *wayPointsArray =  [self decodePolyLine:polyline.path.encodedPath];
  • here decodePolyline is function that you seen on my blog
  • polyline is object of GMSPolyline *_polyline;

Thnaks