Google Maps navigation not working
austimkelly opened this issue · 1 comments
It seems that providing the saddr param isn't working on latest google maps. I just left it out and then navigation from my current location worked fine.
https://developers.google.com/maps/documentation/ios/urlscheme
For example:
NSString *dAddrVal = [NSString stringWithFormat:@"%f,%f", end.coordinate.latitude, end.coordinate.longitude];
NSString *url = [NSString stringWithFormat:@"comgooglemaps://?daddr=%@&directionsmode=driving",
dAddrVal
];
I had the same problem but I found that the issue was the format of the daddr param. I removed the destination map point's name and it worked fine. I don't think the latest Google Maps supports the name of the destination in the format that it is currently being created in googleMapsStringForMapPoint: mapPoint
.
My quick fix was just this (Google Maps guessed the location name based on the lat/long, so that won't always be perfect, in my case it was fine):
[CMMapLauncher launchMapApp:CMMapAppGoogleMaps
forDirectionsTo:[CMMapPoint mapPointWithName:nil
coordinate:myCoordinate]];