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

Rob*_*ert 13 iphone google-maps ios

目前我正在这样做'获取方向':

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];
Run Code Online (Sandbox Code Playgroud)

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

Mat*_*ick 15

只需添加

dirflg=w
Run Code Online (Sandbox Code Playgroud)

你的参数.

  • @amol_subhedar使用**r**代表*transit*,**b**代表*bicycle*,**d**代表*驾驶*,**h**代表*避免高速公路*,**t**代表*避免收费*. (8认同)