2013-02-09 101 views
13

我正在使用下面的代码从iOS应用程序打开Goog​​le地图,在该应用程序中传递地点的起点和终点。iOS:如何在谷歌地图上启用音频指示

它从起点到终点正确导航,但不通过导航音频(语音)

我想启用语音指导功能。

请帮助

ClientState *clientState = [ClientState sharedInstance];    
CLLocation *currentLocation = clientState.currentLocation;    

NSString *googleMapsURLString = [NSString stringWithFormat:@"maps://maps.google.com/?xyz=xyz&saddr=%1.8f,%1.8f&daddr=%@,%@", 
     currentLocation.coordinate.latitude, currentLocation.coordinate.longitude, trip.pickupLatitude, trip.pickupLongitude]; 

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:googleMapsURLString]]; 
+0

你使用的是iOS 6吗?它不支持语音控制​​ios 5没有 – 2013-02-09 15:31:51

+0

我可以在iOS 6中实现这一点...或任何真实的链接..? – Azhar 2013-02-09 17:09:49

+0

不可能在ios6对不起还没有反正 – 2013-02-09 17:10:34

回答

2

的地图应用程序将处理的音频指导你。你不需要启用它。如果您打开Apple Maps URL方案或Google地图应用程序,则会在音频打开时通过音频引导用户。语音指示只适用于Apple Maps App的某些手机。 iPhone 5和4S有声音方向,而iPhone 4和3GS则没有。就像iPhone 4上没有Siri一样,没有Siri语音导航。

请参阅this thread Apple的额外讨论。