Iphone 如何从移动网站打开iOS 6地图?
我有一个移动网站,我有一个链接,可以从我的网站中打开谷歌地图应用程序。然而,随着新版ios6的发布,谷歌地图的原生版本已经不复存在,现在链接将打开到基于safari的谷歌地图。我宁愿在原生的苹果地图应用程序中打开它。我该怎么做Iphone 如何从移动网站打开iOS 6地图?,iphone,html,ios,mobile,Iphone,Html,Ios,Mobile,我有一个移动网站,我有一个链接,可以从我的网站中打开谷歌地图应用程序。然而,随着新版ios6的发布,谷歌地图的原生版本已经不复存在,现在链接将打开到基于safari的谷歌地图。我宁愿在原生的苹果地图应用程序中打开它。我该怎么做 谢谢你的帮助 您使用的是maps.apple.com,而不是以前的谷歌域名maps.Google.com。这将与运行5.x及以下版本的旧设备保持兼容 看起来是这样的: http://maps.apple.com/maps?q=cupertino 大多数参数都是相同的,但
谢谢你的帮助 您使用的是
maps.apple.com
,而不是以前的谷歌域名maps.Google.com
。这将与运行5.x及以下版本的旧设备保持兼容
看起来是这样的:
http://maps.apple.com/maps?q=cupertino
大多数参数都是相同的,但更多细节请参见Apple文档:
你想要什么
打开地图web safari还是打开地图应用程序
试试这个
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]];
这看起来像是针对移动应用程序,而不是网站(问题是关于什么)。