xcodemaddy
xcodemaddy

Reputation: 15

How to draw route in map in iphone

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.

Upvotes: 1

Views: 3492

Answers (2)

Faraz Haider
Faraz Haider

Reputation: 128

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/

Upvotes: 1

vdaubry
vdaubry

Reputation: 11439

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

Upvotes: 1

Related Questions