|
|
|
|
|
by edster
5784 days ago
|
|
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) |
|