A partir de maintenant, je produis avec succès les directions avec l'application Maps de mon application avec le code suivant:générons itinéraire à pied avec application Maps iOS
NSString *formattedGroceryAddress = [[NSString stringWithFormat:@"%@",((EnhancedUIActionSheet *)actionSheet).grocery.address] stringByReplacingOccurrencesOfString:@" " withString:@"+"];
NSString *routeString = [NSString stringWithFormat:@"http://maps.google.com/maps?saddr=%f,%f&daddr=%@",localDataHelper.userLocation.coordinate.latitude,localDataHelper.userLocation.coordinate.longitude,formattedGroceryAddress];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:routeString]];
Il ouvre l'application Maps avec les directions conduite appropriée. La chose est, je voudrais ouvrir Maps avec les directions par défaut. Peut-être que je peux passer un autre paramètre dans ma demande pour le faire.
Quelqu'un sait comment?
Merci!
hey bro .. le lien fonctionne pour moi, mais maintenant j'ai un problème que je ne peux pas obtenir Retour à mon application d'où j'ai appelé l'application de la carte. Une idée ?? – nikesh
Voici une url de travail de la documentation Apple https://developer.apple.com/library/content/featuredarticles/iPhoneURLScheme_Reference/MapLinks/MapLinks.html – benLIVE