我意识到,你可以做这样的事情打开谷歌地图应用程序准备好方向:打开谷歌地图,公交路线
NSString* urlString = @"http://maps.google.com/maps?saddr=London+UK&daddr=Birmingham+UK";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString: urlString]];
但有一个参数,我可以添加到自动切换到公交路线?苹果的开发者文档似乎没有再提:
我们怎样才能看到这个XML格式的页面?如XML格式给出的驱动方向。例如:http://maps.googleapis.com/maps/api/directions/xml?origin=111%20Davisville%20Avenue,Toronto,ON&destination=469%20King%20Street%20West,%20Toronto,%20ON&sensor=false&dirflg=r即使最后有dirflg = r,它仍然会显示行车路线。 – c0d3Junk13 2011-12-25 14:03:46