How to open iOS 6 cards from a mobile site?

I have a mobile site on which I had a link to open the Google maps application on my website. Now, however, with the new version of ios6, the native version of google maps is no longer there, and now the link opens to Google maps based on safari. I would prefer it to be open in the Apple maps app. How can i do this?

Thanks for the help!

+5
source share
2 answers

Instead of using the previous Google domain maps.google.com you use maps.apple.com . This will remain compatible with older devices running 5.x and below.

It looks like this:

 http://maps.apple.com/maps?q=cupertino 

Most options are the same, but see Apple docs for more details:

Apple URL Link Link: Map Links

+14
source

what you need?

open a web safari card or open a map app?

try it

 CLLocation * currentLocation; NSURL *requestUrl; CLLocationCoordinate2D storedLocation; CLLocationCoordinate2D start = { (storedLocation.latitude), (storedLocation.longitude) }; //Bitiş Yeri CLLocationCoordinate2D end = { ([koordinatX floatValue]), ([koordinatY floatValue]) }; NSString *googleMapsURLString = [NSString stringWithFormat:@"http://maps.google.com/?saddr=%1.6f,%1.6f&daddr=%1.6f,%1.6f", start.latitude, start.longitude, end.latitude, end.longitude]; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:googleMapsURLString]]; 
+1
source

Source: https://habr.com/ru/post/902641/