This is a very amateur question.
The following is a code to check if google maps exists on an iOS device, as mentioned on the google maps iOS url scheme page.
if ([[UIApplication sharedApplication] canOpenURL:
[NSURL URLWithString:@"comgooglemaps://"]]) {
[[UIApplication sharedApplication] openURL:
[NSURL URLWithString:@"comgooglemaps://?center=40.765819,-73.975866&zoom=14&views=traffic"]];
} else {
NSLog(@"Can't use comgooglemaps://");
}
I am making a mobile website and I don't know where to place this. In my JavaScript
file?
Please help. Thanks in advance.