0

我正在使用“HERE SDK for iOS”在我的应用程序中实现逐向导航。当我在 GuidanceManeuverView 和 GuidanceEstimatedArrivalView 中显示距离时,我遇到了一个问题。所有测量值均以英尺、码和英里为单位。但是,在美国,我们不使用码,而只使用英里和英尺。配置测量系统的唯一方法是navigationManager.voicePackageMeasurementSystem = .imperialUS,但它只改变语音句子。

无论如何将测量单位更改为英制

4

1 回答 1

0

SDK 3.X (Premium Edition) 只能设置语音引导的单位。实现目标有两种选择:

(1)使用Apple的测量框架在应用程序端实现转换。请找到以下文档: https://developer.apple.com/documentation/foundation/measurementformatter/ https://developer.apple.com/documentation/foundation/units_and_measurement

如果您使用的是 HERE Mobile SDK UI Kit,那么您可以从示例代码中获得灵感:https ://github.com/heremaps/msdkui-ios/blob/3bb9dfc95647f489521b70e2ae5fb0a536cdb589/Documentation/Guides_Examples/MSDKUIPrimer/MSDKUIPrimer/GuidanceViewController.swift #L48

(2)使用SDK 4.x 导航版 https://developer.here.com/documentation/ios-sdk-navigate/

于 2021-08-16T03:42:59.073 回答