News for hackers. Stuff that matters.
Re:Drawing Map Routes on IPhone using unofficial Google Maps... by edster on Wednesday August 11, 2010 @09:45AM (#1594628)
I've used this before and it's also available in XML format by using the KML format. What's not mentioned and is an extra bonus is that this doesn't require a Google API key. This is just calling a public URL.

NSString startingLoc = [NSString stringWithFormat:@"%f,%f", starting.latitude, starting.longitude];

NSString endingLoc = [NSString stringWithFormat:@"%f,%f", ending.latitude, ending.longitude];

NSString *dirURL = [NSString stringWithFormat:@"maps.google.com/maps?saddr=%@&daddr=%@&output=kml, startingLoc, endingLoc];

(I took off the http: from the string because the text editor insisted on turning it into a url and ended up hiding the interesting output=kml part)

There are no comments on this comment yet.