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 |
void onInitNaviFailure()
void onGetNavigationText(java.lang.String s)
s - 播报文字。void onLocationChange(AMapNaviLocation location)
location - 当前位置的定位信息。void onArriveDestination(boolean isEmulaterNavi)
isEmulaterNavi - true代表是模拟导航到达目的地,false代表实时导航到达目的地void onStartNavi(int type)
void onCalculateRouteSuccess(int[] ids)
ids - 路线索引id数组,第一条为12,第二条为13,第三条为14。void onCalculateRouteFailure(int errorInfo)
errorInfo - 参见PathPlanningErrCodePathPlanningErrCodevoid onStopSpeaking()
当退出组件导航页,或切换组件的播报模式为静音的时候,会触发该回调。建议在收到该回调时,停止外部一切导航相关的播报。
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.
void onReCalculateRoute(int type)
type - 参见ReCalculateRouteTypeReCalculateRouteTypevoid onExitPage(int pageType)
void onStrategyChanged(int strategy)
strategy - 切换后偏好 参见PathPlanningStrategyPathPlanningStrategyvoid onArrivedWayPoint(int wayID)
wayID - 到达途径点的编号,标号从0开始,依次累加。void onMapTypeChanged(int mapType)
mapType - 枚举值参考AMap类, 3-黑夜,4-白天void onNaviDirectionChanged(int naviMode)
naviMode - 导航视角, 1-正北朝上模式 2-车头朝上状态void onDayAndNightModeChanged(int mode)
mode - 0-自动切换 1-白天 2-夜间void onBroadcastModeChanged(int mode)
mode - 1-简洁播报 2-详细播报 3-静音void onScaleAutoChanged(boolean enable)
enable - 是否开启View getCustomMiddleView()
View getCustomNaviView()
View getCustomNaviBottomView()