我正在使用以下代码从我的 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/