Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Maps navigation not working #6

Open
austimkelly opened this issue Jan 23, 2015 · 1 comment
Open

Google Maps navigation not working #6

austimkelly opened this issue Jan 23, 2015 · 1 comment

Comments

@austimkelly
Copy link

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

@ddramowicz
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants