iOS:如何在Google地图上启用音频路线

时间:2013-02-09 15:24:57

标签: iphone ios objective-c ipad google-maps

我正在使用以下代码从我的iOS应用程序中打开Goog​​le地图,我在该应用程序中传递了起点和终点。

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

我想启用语音指导工具。

请帮助

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]];

1 个答案:

答案 0 :(得分:2)

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

请参阅Apple上的this thread以进行额外讨论。