Question

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.

Was it helpful?

Solution

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.

OTHER TIPS

Vladimir is right.See another sample code here

Drawing routes on mapkit

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top