目前我这样做是为了“获取方向”:
NSString *googleMapsURLString;
googleMapsURLString = [NSString stringWithFormat:
@"http://maps.google.com/?saddr=%1.6f,%1.6f&daddr=%1.6f,%1.6f",
curLoc.latitude, // Start
curLoc.longitude,
self.hotspot.coordinate.latitude,
self.hotspot.coordinate.longitude];
NSLog(@"Opening URL: %@",googleMapsURLString);
NSURL *url = [NSURL URLWithString:googleMapsURLString];
[[UIApplication sharedApplication] openURL:url];
有谁知道是否有通过步行而不是默认驾驶获取路线的参数?
最佳答案
只需添加
dirflg=w
您的参数。
关于iphone - 当您打开谷歌地图 URL 时,您如何默认步行路线?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5700669/