iphone - iOS : How to enable Audio directions on Google Maps

标签 iphone ios objective-c ipad google-maps

我正在使用以下代码从我的 iOS 应用程序打开 Google map ,我在其中传递起点和终点。

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

我想启用语音指导功能。

请帮忙

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

最佳答案

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

参见 this thread在 Apple 上进行额外讨论。

关于iphone - iOS : How to enable Audio directions on Google Maps,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14789580/

相关文章:

ios - react native : How to select the next TextInput after pressing the "next" keyboard button?

ios - global().async 中的 main.sync 是什么意思?

ios - 持续监听 Internet 可达性?

objective-c - 保护开关中的外壳

iphone - 是否可以将一个 iPhone 应用程序嵌入到另一个 iPhone 应用程序中?

ios - 在代码中为 UIButton 设置图像

iphone - 如何将附加阴影添加到 uinavigationbar 和 uitoolbar

iphone - 如何开发人脸识别 iPhone 应用程序?

iphone - 检测蓝牙设备 “ids”

ios - 使用 AutoLayout 移动 UIView 的位置