打开Goog​​le地图网址时,如何默认使用步行路线?

时间:2011-04-18 09:05:53

标签: iphone ios google-maps

目前我这样做是为了“获取路线”:

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];

有没有人知道是否有参数通过步行获取方向而不是默认驾驶?

1 个答案:

答案 0 :(得分:15)

添加

dirflg=w

参数。