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

Azh*_*har 13 iphone google-maps objective-c ipad ios

我正在使用以下代码从我的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]];
Run Code Online (Sandbox Code Playgroud)

Chr*_*man 2

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

请参阅Apple 上的此线程以获取更多讨论。