tags:

views:

584

answers:

3

Hi,

I want to draw path from one location to other location. How to plot the path between two location.

I have coordinates(latitude,longitude) for both location.

How can i achieve this functionality?

Thanks,
Jim.

+2  A: 

You can use google maps API to obtain path elements of the route and then draw them over the map. Also there's a MapKit extension by Kishikawa Katsumi available for download on github that provides this functionality.

Vladimir
Thanks Vladimir. That's really helpful.
Jim
A: 

- (CGPoint)convertCoordinate:(CLLocationCoordinate2D)coordinate toPointToView:(UIView *)view, CGContextMoveToPoint and CGContextAddLineToPoint should get you started.

Johan Kool
+1  A: 

Vladimir is right.See another sample code here

Drawing routes on mapkit

Rahul Vyas