com.amap.api.navi

## 接口 INaviInfoCallback

-     public interface INaviInfoCallback

- - ### 方法概要

    所有方法 实例方法 抽象方法
    限定符和类型 | 方法和说明
    --- | ---
    `View` | `getCustomMiddleView()` 获取导航地图自定义View,该View在导航界面的垂直居中，水平靠左位置 Get custom View of navigation map, this View is vertically centered and horizontally left-aligned in the navigation interface
    `View` | `getCustomNaviBottomView()` 获取导航地图自定义View，该View在导航整体界面的下面，注意要设置setLayoutParams并且设置高度 Get custom View of navigation map, this View is below the overall navigation interface.
    `View` | `getCustomNaviView()` 获取导航地图自定义View,该View在导航界面的当前路名位置，使用该方法以后，将不会显示当前路名 Get custom View of navigation map, this View is at the current road name position in the navigation interface.
    `void` | `onArriveDestination(boolean isEmulaterNavi)` 到达目的地后回调函数 Callback function after reaching the destination.
    `void` | `onArrivedWayPoint(int wayID)` 驾车路径导航到达某个途经点的回调函数 Callback function when driving route navigation reaches a waypoint.
    `void` | `onBroadcastModeChanged(int mode)` 播报模式变化回调 Broadcast mode change callback
    `void` | `onCalculateRouteFailure(int errorInfo)` 驾车路径规划失败后的回调函数 Callback function after driving route planning fails.
    `void` | `onCalculateRouteSuccess(int[] ids)` 算路成功回调 Route calculation success callback
    `void` | `onDayAndNightModeChanged(int mode)` 昼夜模式设置变化回调 Day/night mode setting change callback
    `void` | `onExitPage(int pageType)` 退出组件或退出组件导航的回调函数 Callback function for exiting component or component navigation
    `void` | `onGetNavigationText(java.lang.String s)` 导航播报信息回调函数 Navigation broadcast information callback function.
    `void` | `onInitNaviFailure()` 导航初始化失败时的回调函数 Callback function when navigation initialization fails.
    `void` | `onLocationChange(AMapNaviLocation location)` 当GPS位置有更新时的回调函数 Callback function when GPS position is updated.
    `void` | `onMapTypeChanged(int mapType)` 组件地图白天黑夜模式切换回调 Component map day/night mode switching callback
    `void` | `onNaviDirectionChanged(int naviMode)` 导航视角变化回调 Navigation view angle change callback
    `void` | `onReCalculateRoute(int type)` 重新规划的回调 Re-planning callback
    `void` | `onScaleAutoChanged(boolean enable)` 比例尺智能缩放设置变化回调 Scale intelligent zoom setting change callback
    `void` | `onStartNavi(int type)` 启动导航后的回调函数 Callback function after starting navigation
    `void` | `onStopSpeaking()` 停止播报回调 Stop broadcast callback.
    `void` | `onStrategyChanged(int strategy)` 切换算路偏好回调 Switch route preference callback

- - ### 方法详细资料

    - #### onInitNaviFailure

          void onInitNaviFailure()

      导航初始化失败时的回调函数
      Callback function when navigation initialization fails.
      从以下版本开始:
        5.2.0

    - #### onGetNavigationText

          void onGetNavigationText(java.lang.String s)

      导航播报信息回调函数
      Navigation broadcast information callback function.
      参数:
        `s` - 播报文字。
        Broadcast text.
      从以下版本开始:
        5.2.0

    - #### onLocationChange

          void onLocationChange(AMapNaviLocation location)

      当GPS位置有更新时的回调函数
      Callback function when GPS position is updated.
      参数:
        `location` - 当前位置的定位信息。
        Location information of current position.
      从以下版本开始:
        5.2.0

    - #### onArriveDestination

          void onArriveDestination(boolean isEmulaterNavi)

      到达目的地后回调函数
      Callback function after reaching the destination.
      参数:
        `isEmulaterNavi` - true代表是模拟导航到达目的地，false代表实时导航到达目的地
        true represents simulated navigation reaching the destination, false represents real-time navigation reaching the destination
      从以下版本开始:
        5.2.0

    - #### onStartNavi

          void onStartNavi(int type)

      启动导航后的回调函数
      Callback function after starting navigation
      参数:
        `type` - 导航类型参见`NaviType`
        Navigation type, see `NaviType`
      从以下版本开始:
        5.2.0

    - #### onCalculateRouteSuccess

          void onCalculateRouteSuccess(int[] ids)

      算路成功回调
      Route calculation success callback
      参数:
        `ids` - 路线索引id数组，第一条为12，第二条为13，第三条为14。
        Route index ID array, the first is 12, the second is 13, the third is 14.
      从以下版本开始:
        5.2.0

    - #### onCalculateRouteFailure

          void onCalculateRouteFailure(int errorInfo)

      驾车路径规划失败后的回调函数
      Callback function after driving route planning fails.
      参数:
        `errorInfo` - 参见`PathPlanningErrCode`
        See `PathPlanningErrCode`
      从以下版本开始:
        5.2.0

    - #### onStopSpeaking

          void onStopSpeaking()

      停止播报回调
      Stop broadcast callback.

      当退出组件导航页，或切换组件的播报模式为静音的时候，会触发该回调。建议在收到该回调时，停止外部一切导航相关的播报。
      When exiting the component navigation page or switching the component's broadcast mode to mute, this callback will be triggered. It is recommended to stop all external navigation-related broadcasts when receiving this callback.

      从以下版本开始:
        5.2.0

    - #### onReCalculateRoute

          void onReCalculateRoute(int type)

      重新规划的回调
      Re-planning callback
      参数:
        `type` - 参见`ReCalculateRouteType`
        See `ReCalculateRouteType`
      从以下版本开始:
        5.6.0

    - #### onExitPage

          void onExitPage(int pageType)

      退出组件或退出组件导航的回调函数
      Callback function for exiting component or component navigation
      参数:
        `pageType` - 参见`PageType`
        See `PageType`
      从以下版本开始:
        5.6.0

    - #### onStrategyChanged

          void onStrategyChanged(int strategy)

      切换算路偏好回调
      Switch route preference callback
      参数:
        `strategy` - 切换后偏好 参见`PathPlanningStrategy`
        Preference after switching, see `PathPlanningStrategy`
      从以下版本开始:
        6.0.0

    - #### onArrivedWayPoint

          void onArrivedWayPoint(int wayID)

      驾车路径导航到达某个途经点的回调函数
      Callback function when driving route navigation reaches a waypoint.
      参数:
        `wayID` - 到达途径点的编号，标号从0开始，依次累加。
        The number of the reached waypoint, numbered starting from 0 and increasing sequentially.
      从以下版本开始:
        6.1.0

    - #### onMapTypeChanged

          void onMapTypeChanged(int mapType)

      组件地图白天黑夜模式切换回调
      Component map day/night mode switching callback
      参数:
        `mapType` - 枚举值参考AMap类, 3-黑夜，4-白天
        Enumeration values refer to AMap class, 3-night, 4-day
      从以下版本开始:
        6.7.0

    - #### onNaviDirectionChanged

          void onNaviDirectionChanged(int naviMode)

      导航视角变化回调
      Navigation view angle change callback
      参数:
        `naviMode` - 导航视角, 1-正北朝上模式 2-车头朝上状态
        Navigation view angle, 1-north-up mode 2-car-front-up state
      从以下版本开始:
        7.1.0

    - #### onDayAndNightModeChanged

          void onDayAndNightModeChanged(int mode)

      昼夜模式设置变化回调
      Day/night mode setting change callback
      参数:
        `mode` - 0-自动切换 1-白天 2-夜间
        0-auto switch 1-day 2-night
      从以下版本开始:
        7.1.0

    - #### onBroadcastModeChanged

          void onBroadcastModeChanged(int mode)

      播报模式变化回调
      Broadcast mode change callback
      参数:
        `mode` - 1-简洁播报 2-详细播报 3-静音
        1-concise broadcast 2-detailed broadcast 3-mute
      从以下版本开始:
        7.1.0

    - #### onScaleAutoChanged

          void onScaleAutoChanged(boolean enable)

      比例尺智能缩放设置变化回调
      Scale intelligent zoom setting change callback
      参数:
        `enable` - 是否开启
        Whether to enable
      从以下版本开始:
        7.1.0

    - #### getCustomMiddleView

          View getCustomMiddleView()

      获取导航地图自定义View,该View在导航界面的垂直居中，水平靠左位置
      Get custom View of navigation map, this View is vertically centered and horizontally left-aligned in the navigation interface
      返回:
        View
      从以下版本开始:
        6.9.0

    - #### getCustomNaviView

          View getCustomNaviView()

      获取导航地图自定义View,该View在导航界面的当前路名位置，使用该方法以后，将不会显示当前路名
      Get custom View of navigation map, this View is at the current road name position in the navigation interface. After using this method, the current road name will not be displayed
      返回:
        View
      从以下版本开始:
        6.1.0

    - #### getCustomNaviBottomView

          View getCustomNaviBottomView()

      获取导航地图自定义View，该View在导航整体界面的下面，注意要设置setLayoutParams并且设置高度
      Get custom View of navigation map, this View is below the overall navigation interface. Note that setLayoutParams must be set and the height must be set
      返回:
        View
      从以下版本开始:
        6.1.0