Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you default to walking directions when you open a google maps URL?

Currently I am doing this to 'get directions':

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

Does anyone know if there is a parameter to get directions via walking instead of defaulting to driving?

like image 434
Robert Avatar asked Apr 18 '11 09:04

Robert


People also ask

How do I use Google Maps walking mode?

Select "walking" as mode of transportation. Since you're planning on walking, click on the pedestrian icon on the toolbar above the section on the upper left corner of the page. The routes on the map will slightly change to accommodate your preferred method of transportation.

Does Google Maps have a walking mode?

Apart from walking, you can select driving, transit, ride services, cycling, and flight mode. In this guide, we'll show you how to change from walking to driving in Google Maps across different devices.

How do I change Google Maps to walking on my iPhone?

Switch to walking directions: If walking isn't your default mode of travel or if you're viewing a transit map, tap the travel mode button (below the Directions list), then tap. to see a suggested walking route. Avoid hills, busy roads, or stairs: Tap Avoid (below the Directions list), choose your options, the tap Apply ...


1 Answers

Just add

dirflg=w

to your parameters.

like image 78
Matthew Frederick Avatar answered Oct 08 '22 10:10

Matthew Frederick