Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Map Route Draw on IPhone

I am developing an application that has two versions. One for web and another for iPhone.

In the web app, I am able to draw a route on the road (drawing the route automatically that follows roads/highways) and off road (draw direct line between two specific points).

Is there an API, for iPhone, that can be used to draw a route on the map? I am able to draw a straight line on the map between two nodes, but i am not able to draw a road map route in iPhone.

I am using iPhone 3.0 and SDK 3.0

Thanks.

like image 538
Vivek Navadia Avatar asked Jul 06 '09 07:07

Vivek Navadia


2 Answers

Maybe you want to take a look at Craig Spitzkoff's MapLinesAndAnnotations sample that he recently wrote:

  1. Drawing polyines or routes on a MKMapView (Using Map Kit on the iPhone)
  2. Using MKAnnotation, MKPinAnnotationView and creating a custom MKAnnotationView in an MKMapView
like image 157
digdog Avatar answered Sep 21 '22 14:09

digdog


there's a new API in iOS4 called MKOverlayPathView which does exactly this. MKOverlayPathView

I just wanted to update this post with this information so people get the whole story.

like image 29
roocell Avatar answered Sep 19 '22 14:09

roocell