MKMapView Route/Directions

Posted by Mark on Stack Overflow See other posts from Stack Overflow or by Mark
Published on 2009-09-29T20:44:16Z Indexed on 2010/05/31 6:52 UTC
Read the original article Hit count: 625

I found that the Google Maps API supports Directions through:

var map;
var directionsPanel;
var directions;

function initialize() {
  map = new GMap2(document.getElementById("map_canvas"));
  directionsPanel = document.getElementById("my_textual_div");
  map.setCenter(new GLatLng(49.496675,-102.65625), 3);
  directions = new GDirections(map, directionsPanel);
  directions.load("from: 500 Memorial Drive, Cambridge, MA to: 4 Yawkey Way, Boston, MA 02215 (Fenway Park)");
}

So how can this be translated into Objective-C so it can be retrieved by the iPhone? I know how to draw a line on MKMapView I just need the geolocations for the route.

Or perhaps there is a different way to get the route between two geolocation points.

Please let me know,

Thanks in advance.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about mkmapview