How to draw route in map in iphone

3.4k Views Asked by At

I want to draw route in map, for this I am storing latitude and longitude in my server. when this view opens it fetches all lat and long from server and plots it in mapView. Suppose server gets new lat and long this should show in mapView without closing this view, means map has plotted route if it gets new lat and long this route should continue from last point.

2

There are 2 best solutions below

0
On BEST ANSWER

Apple supplied a demo application called Breadcrumb with the 2010 WWDC Developer videos that does exactly this. You can get the sample code from here: http://developer.apple.com/videos/wwdc/2010/

1
On

We wrote a category to mapKit that allow you to show route over the map :

http://code.google.com/p/octomapkit/

Very easy to use :

[youMap addRouteFrom:startCoord to:endCoord zommed:shouldZoom]

Hope this helps, Vincent