HERE iOS SDK 高级版 - 有没有办法防止宣布"waypoints"/中途停留?



我正在制作iOS Premium应用程序,为用户加载的路线具有很多航路点,每个回合都是作为路点,以确保按照它准确地遵循特定路线保存。这会弥补语音指导,而不是宣布下一个回合指南宣布" ...您将停留"之后"我希望它像普通人一样说" ...左转后",好像没有路线。这可能吗?我在哪里可以配置语音指南?

您几乎没有选择。

首先:

启用/禁用某些操作的语音提示。

@interface NMANavigationManager : NSObject
.....
- (BOOL)setVoiceEnabled:(BOOL)enabled forManeuverAction:(NMAManeuverAction)action
.....

NMAManeuver.h
/**
* Defines types of actions for a NMAManeuver.
*/
typedef NS_ENUM(NSInteger, NMAManeuverAction) {
    /** An undefined action. */
    NMAManeuverActionUndefined = 0,             // 0
    /** An indication there is no action associated with the maneuver. */
    NMAManeuverActionNone,                      // 1
    /** An action that indicates the end of a route. */
    NMAManeuverActionEnd,                       // 2
    /** An action that indicates a stopover. */
    NMAManeuverActionStopover,                  // 3
    /** An action that indicates a junction. */
    NMAManeuverActionJunction,                  // 4
    /** An action that indicates a roundabout. */
    NMAManeuverActionRoundabout,                // 5
    /** An action that indicates a u-turn. */
    NMAManeuverActionUTurn,                     // 6
    /** An action that indicates entering a highway from the right. */
    NMAManeuverActionEnterHighwayFromRight,     // 7
    /** An action that indicates entering a highway from the left. */
    NMAManeuverActionEnterHighwayFromLeft,      // 8
    /** An action that indicates entering a highway. */
    NMAManeuverActionEnterHighway,              // 9
    /** An action that indicates leaving a highway. */
    NMAManeuverActionLeaveHighway,              // 10
    /** An action that indicates changing from one highway to another. */
    NMAManeuverActionChangeHighway,             // 11
    /** An action that indicates continuing along a highway. */
    NMAManeuverActionContinueHighway,           // 12
    /** An action that indicates boarding a ferry. */
    NMAManeuverActionFerry,                     // 13
    /** An action that indicates passing a junction. */
    NMAManeuverActionPassJunction,              // 14
    /** An action that indicates heading after leaving public transit station. */
    NMAManeuverActionHeadTo,                    // 15
    /** An action that indicates passing a station. */
    NMAManeuverActionPassStation,               // 16
    /** An action that indicates transit line change. */
    NMAManeuverActionChangeLine,                // 17

    /** An invalid action. */
    NMAManeuverActionInvalid = -1
};

第二:您可以使用委托法。只是返回不,您不会听到任何语音反馈。

@protocol NMANavigationManagerDelegate<NSObject>
@optional
......
-(BOOL)navigationManager:(NMANavigationManager *)navigationManager shouldPlayVoiceFeedbackWithText:(NSString *)text
.....

但是,在这种情况下,您必须解析"反馈文本"才能了解您是否去播放反馈。

为了解决此问题,我将参数;表示&amp; navigation = navigation'添加到getRoute呼叫中。然后,我每个位置(形状)将每个路点添加为" nmawaypointType.viawaypoint",除了第一个和最后一个路点,即nmawaypointType.stopwaypoint。一旦执行此操作,正确的路线被表示并在路线期间播放正确的语音指导。

最新更新