Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open Google Maps App in iOS 6

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

like image 401
Zahur Avatar asked Dec 13 '12 08:12

Zahur


1 Answers

[[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

like image 169
freestyler Avatar answered Oct 24 '22 23:10

freestyler