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?
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.
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.
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 ...
Just add
dirflg=w
to your parameters.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With