13

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

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

我想启用语音指导功能。

请帮忙

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

1 回答 1

2

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

有关更多讨论,请参阅Apple 上的此线程

于 2013-07-18T23:45:15.067 回答