I would like to open Google Map App in iOS 6 programmatically. I tried to open the maps in by passing url - maps..... but it is still opening in the Safari
Asked
Active
Viewed 2,787 times
2 Answers
11
[[UIApplication sharedApplication] canOpenURL:
[NSURL URLWithString:@"comgooglemaps://"]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:
@"comgooglemaps://?center=40.765819,-73.975866&zoom=14&views=traffic"]];
reference: https://developers.google.com/maps/documentation/ios/urlscheme

freestyler
- 5,224
- 2
- 32
- 39
0
try this
The domain must be maps.apple.com.
A parameter cannot be q=* if the value is a URL (so KML is not picked up). The parameters cannot include view=text or dirflg=r.
https://developer.apple.com/library/safari/#featuredarticles/iPhoneURLScheme_Reference/Articles/MapLinks.html#//apple_ref/doc/uid/TP40007894-SW1

Darkface35
- 78
- 7