public class SimpleNaviListener extends java.lang.Object implements AMapNaviDriveListener, AMapNaviTravelListener
| 构造器和说明 |
|---|
SimpleNaviListener() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
hideCross()
关闭路口放大图回调(实景图)
Close intersection enlargement map callback (real scene map). |
void |
hideLaneInfo()
关闭道路信息回调
Close road information callback. |
void |
hideModeCross()
关闭路口放大图回调(模型图)
Close intersection enlargement map callback (model map). |
void |
notifyParallelRoad(int parallelRoadType)
已过时。
|
void |
onArriveDestination()
到达目的地后回调函数
Callback function after reaching the destination. |
void |
onArrivedTravelWayPoint(int wayIndex)
骑步行导航到达途径点的回调函数
Callback function when cycling/walking navigation reaches a waypoint |
void |
onArrivedWayPoint(int wayID)
驾车路径导航到达某个途经点的回调函数
Callback function when driving route navigation reaches a waypoint. |
void |
onCalculateRouteFailure(AMapCalcRouteResult routeResult)
路线规划失败回调,包括算路、导航中偏航、用户改变算路策略、行程点等触发的重算,具体算路结果可以通过
AMapCalcRouteResult获取Route planning failure callback, including recalculations triggered by route calculation, yaw during navigation, user changing route strategy, waypoints, etc. |
void |
onCalculateRouteFailure(int errorInfo)
已过时。
|
void |
onCalculateRouteSuccess(AMapCalcRouteResult routeResult)
路线规划成功回调,包括算路、导航中偏航、用户改变算路策略、行程点等触发的重算,具体算路结果可以通过
AMapCalcRouteResult获取Route planning success callback, including recalculations triggered by route calculation, yaw during navigation, user changing route strategy, waypoints, etc. |
void |
onCalculateRouteSuccess(int[] routeIds)
已过时。
|
void |
onEndEmulatorNavi()
模拟导航停止后回调函数
Callback function after simulated navigation stops. |
void |
onGetNavigationText(int type,
java.lang.String text)
导航播报信息回调函数
Navigation broadcast information callback function. |
void |
onGetNavigationText(java.lang.String text)
已过时。
|
void |
onGpsOpenStatus(boolean enabled)
用户手机位置信息设置是否开启的回调函数
Callback function for whether the user's phone location information setting is enabled. |
void |
onGpsSignalWeak(boolean isWeak)
手机卫星定位信号强弱变化的回调
Callback for changes in mobile phone satellite positioning signal strength |
void |
onInitNaviFailure()
导航初始化失败时的回调函数
Callback function when navigation initialization fails. |
void |
onInitNaviSuccess()
导航初始化成功时的回调函数
Callback function when navigation initialization succeeds. |
void |
onInnerNaviInfoUpdate(InnerNaviInfo mainRouteNaviInfo) |
void |
onInnerNaviInfoUpdate(InnerNaviInfo[] naviInfos) |
void |
onLocationChange(AMapNaviLocation location)
当位置信息有更新时的回调函数
Callback function when position information is updated. |
void |
onManeuverInfoUpdate(int iconType,
Bitmap iconBitmap)
导航转向信息回调。
|
void |
onNaviInfoUpdate(NaviInfo naviInfo)
导航引导信息回调
Navigation guidance information callback. |
void |
onNaviRouteNotify(AMapNaviRouteNotifyData notifyData)
导航过程中道路信息通知
Road information notification during navigation. |
void |
onNextManeuverInfoUpdate(int iconType,
Bitmap iconBitmap)
下下路口导航转向信息回调。
|
void |
onPlayRing(int type)
回调各种类型的提示音,类似高德导航"叮"
Callback for various types of prompt sounds, similar to Amap navigation "ding". |
void |
onReCalculateRouteForTrafficJam()
驾车导航时,当前方遇到拥堵时准备重新规划路线前的通知回调
Notification callback before preparing to recalculate route when encountering traffic jams ahead during driving navigation. |
void |
onReCalculateRouteForYaw()
偏航后准备重新规划路线前的通知回调
Notification callback before preparing to recalculate route after yaw. |
void |
onSelectRouteId(int mainIndex) |
void |
onServiceAreaUpdate(AMapServiceAreaInfo[] infoArray)
服务区信息回调函数
Service area information callback function 注意:该接口仅驾车模式有效 Note: This interface is only valid in driving mode |
void |
onStartNavi(int type)
启动导航后的回调函数
Callback function after starting navigation |
void |
onStopNavi() |
void |
onSuggestChangePath(long newPathId,
long oldPathId,
int saveTime,
java.lang.String roadName) |
void |
onTrafficStatusUpdate()
当前方路况光柱信息有更新时回调函数
Callback function when current traffic light column information is updated. |
void |
onUpdateDriveComfort(AMapNaviDriveComfort driveComfort)
驾车导航道路舒适度回调
Driving navigation road comfort callback. |
void |
onUpdateDriveEvent(AMapNaviDriveEvent driveEvent)
驾车导航三急(急加速/急减速/急转弯)事件回调
Driving navigation three urgent events (rapid acceleration/rapid deceleration/sharp turn) callback. |
void |
onUpdateGpsSignalStrength(int strength) |
void |
onUpdateNaviPath() |
void |
onUpdateNaviSpeedLimitSection(int speed)
路段限速事件更新
Road segment speed limit event update |
void |
onUpdateTmcStatus(NaviCongestionInfo tmcStatusInfo) |
void |
OnUpdateTrafficFacility(AMapNaviTrafficFacilityInfo aMapNaviTrafficFacilityInfo)
已过时。
|
void |
OnUpdateTrafficFacility(AMapNaviTrafficFacilityInfo[] infos)
已过时。
|
void |
showCross(AMapNaviCross aMapNaviCross)
显示路口放大图回调(实景图)
Display intersection enlargement map callback (real scene map). |
void |
showLaneInfo(AMapLaneInfo laneInfo)
显示道路信息回调
Display road information callback. |
void |
showLaneInfo(AMapLaneInfo[] laneInfos,
byte[] laneBackgroundInfo,
byte[] laneRecommendedInfo)
已过时。
|
void |
showModeCross(AMapModelCross modelCross)
显示路口放大图回调(模型图)
Display intersection enlargement map callback (model map). |
void |
updateAimlessModeCongestionInfo(AimLessModeCongestionInfo aimLessModeCongestionInfo)
已过时。
|
void |
updateAimlessModeStatistics(AimLessModeStat aimLessModeStat)
已过时。
|
void |
updateBackupPath(NaviPath[] backupPath) |
void |
updateCameraInfo(AMapNaviCameraInfo[] infoArray)
导航过程中的摄像头信息回调函数
Camera information callback function during navigation 注意:该接口仅驾车模式有效 Note: This interface is only valid in driving mode |
void |
updateIntervalCameraInfo(AMapNaviCameraInfo startCameraInfo,
AMapNaviCameraInfo endCameraInfo,
int status)
导航过程中的区间测速信息回调函数
Interval speed measurement information callback function during navigation 注意:该接口仅驾车模式有效 Note: This interface is only valid in driving mode |
public void onInitNaviFailure()
AMapNaviListeneronInitNaviFailure 在接口中 AMapNaviListenerpublic void onInitNaviSuccess()
AMapNaviListeneronInitNaviSuccess 在接口中 AMapNaviListenerpublic void onStartNavi(int type)
AMapNaviListeneronStartNavi 在接口中 AMapNaviListenertype - 导航类型参见NaviTypeNaviTypepublic void onTrafficStatusUpdate()
AMapNaviListener
注意:该接口仅驾车模式有效
Note: This interface is only valid in driving mode
onTrafficStatusUpdate 在接口中 AMapNaviListenerpublic void onLocationChange(AMapNaviLocation location)
AMapNaviListeneronLocationChange 在接口中 AMapNaviListenerlocation - 当前位置的定位信息。public void onGetNavigationText(int type,
java.lang.String text)
AMapNaviListeneronGetNavigationText 在接口中 AMapNaviListenertype - 播报类型枚举,详情见 NaviTTSTypeNaviTTSTypetext - 播报文案@Deprecated public void onGetNavigationText(java.lang.String text)
AMapNaviListeneronGetNavigationText 在接口中 AMapNaviListenertext - 播报文字。public void onEndEmulatorNavi()
AMapNaviListeneronEndEmulatorNavi 在接口中 AMapNaviListenerpublic void onArriveDestination()
AMapNaviListeneronArriveDestination 在接口中 AMapNaviListener@Deprecated public void onCalculateRouteFailure(int errorInfo)
AMapNaviListeneronCalculateRouteFailure 在接口中 AMapNaviListenererrorInfo - 参见PathPlanningErrCodePathPlanningErrCodepublic void onReCalculateRouteForYaw()
AMapNaviListener
此方法只是通知准备重算事件,开发者不需要在方法中触发算路逻辑,SDK内部会进行算路。
This method only notifies the preparation for recalculation event. Developers do not need to trigger the routing logic in the method, as the SDK will perform routing internally.
onReCalculateRouteForYaw 在接口中 AMapNaviListenerpublic void onReCalculateRouteForTrafficJam()
AMapNaviListener
此方法只是通知准备重算事件,开发者不需要在方法中触发算路逻辑,SDK内部会进行算路。
This method only notifies the preparation for recalculation event. Developers do not need to trigger the routing logic in the method, as the SDK will perform routing internally.
public void onArrivedWayPoint(int wayID)
AMapNaviListener
注意:该接口仅驾车模式有效
Note: This interface is only valid in driving mode
onArrivedWayPoint 在接口中 AMapNaviListenerwayID - 到达途径点的编号,标号从0开始,依次累加。public void onGpsOpenStatus(boolean enabled)
AMapNaviListeneronGpsOpenStatus 在接口中 AMapNaviListenerenabled - true,开启;false,未开启。public void onNaviInfoUpdate(NaviInfo naviInfo)
AMapNaviListeneronNaviInfoUpdate 在接口中 AMapNaviListenernaviInfo - 导航信息类对象。public void updateCameraInfo(AMapNaviCameraInfo[] infoArray)
AMapNaviListener
注意:该接口仅驾车模式有效
Note: This interface is only valid in driving mode
updateCameraInfo 在接口中 AMapNaviListenerinfoArray - 摄像头对象数组public void updateIntervalCameraInfo(AMapNaviCameraInfo startCameraInfo, AMapNaviCameraInfo endCameraInfo, int status)
AMapNaviListener
注意:该接口仅驾车模式有效
Note: This interface is only valid in driving mode
updateIntervalCameraInfo 在接口中 AMapNaviListenerstartCameraInfo - 区间测速起点信息endCameraInfo - 区间测速终点信息status - 具体类型可参考CarEnterCameraStatusCarEnterCameraStatuspublic void onServiceAreaUpdate(AMapServiceAreaInfo[] infoArray)
AMapNaviListener
注意:该接口仅驾车模式有效
Note: This interface is only valid in driving mode
onServiceAreaUpdate 在接口中 AMapNaviListenerinfoArray - 服务区对象数组public void showCross(AMapNaviCross aMapNaviCross)
AMapNaviListener
注意:该接口仅驾车模式有效
Note: This interface is only valid in driving mode
showCross 在接口中 AMapNaviListeneraMapNaviCross - 路口放大图类,可以获得此路口放大图bitmappublic void hideCross()
AMapNaviListener
注意:该接口仅驾车模式有效
Note: This interface is only valid in driving mode
hideCross 在接口中 AMapNaviListenerpublic void showModeCross(AMapModelCross modelCross)
AMapNaviListener
注意:该接口仅驾车模式有效
Note: This interface is only valid in driving mode
showModeCross 在接口中 AMapNaviListenermodelCross - 模型图数据类,可以获取绘制模型图需要的矢量数据public void hideModeCross()
AMapNaviListener
注意:该接口仅驾车模式有效
Note: This interface is only valid in driving mode
hideModeCross 在接口中 AMapNaviListener@Deprecated public void showLaneInfo(AMapLaneInfo[] laneInfos, byte[] laneBackgroundInfo, byte[] laneRecommendedInfo)
AMapNaviListener
注意:该接口仅驾车模式有效
Note: This interface is only valid in driving mode
showLaneInfo 在接口中 AMapNaviListenerlaneInfos - 道路信息数组,可获得当前道路信息,可用于用户使用自己的素材完全自定义显示。laneBackgroundInfo - 道路背景数据数组,可用于装载官方的DriveWayView,并显示。laneRecommendedInfo - 道路推荐数据数组,可用于装载官方的DriveWayView,并显示。public void showLaneInfo(AMapLaneInfo laneInfo)
AMapNaviListener
注意:该接口仅驾车模式有效
Note: This interface is only valid in driving mode
showLaneInfo 在接口中 AMapNaviListenerlaneInfo - 道路信息,可获得当前道路信息,可用于用户使用自己的素材完全自定义显示。public void hideLaneInfo()
AMapNaviListener
注意:该接口仅驾车模式有效
Note: This interface is only valid in driving mode
hideLaneInfo 在接口中 AMapNaviListener@Deprecated public void onCalculateRouteSuccess(int[] routeIds)
AMapNaviListener
注意:该接口仅驾车模式有效
Note: This interface is only valid in driving mode
onCalculateRouteSuccess 在接口中 AMapNaviListenerrouteIds - 路线id数组@Deprecated public void notifyParallelRoad(int parallelRoadType)
AMapNaviListener
注意:该接口仅驾车模式有效
Note: This interface is only valid in driving mode
notifyParallelRoad 在接口中 AMapNaviListenerparallelRoadType - 0表示隐藏 1 表示显示主路 2 表示显示辅路@Deprecated public void OnUpdateTrafficFacility(AMapNaviTrafficFacilityInfo[] infos)
AMapNaviListener
注意:该接口仅驾车模式有效
Note: This interface is only valid in driving mode
OnUpdateTrafficFacility 在接口中 AMapNaviListenerinfos - 道路设施信息@Deprecated public void OnUpdateTrafficFacility(AMapNaviTrafficFacilityInfo aMapNaviTrafficFacilityInfo)
AMapNaviListenerAimlessModeListener.onUpdateTrafficFacility(AMapNaviTrafficFacilityInfo[])AimlessModeListener.onUpdateTrafficFacility(AMapNaviTrafficFacilityInfo[])
注意:该接口仅驾车模式有效
Note: This interface is only valid in driving mode
OnUpdateTrafficFacility 在接口中 AMapNaviListener@Deprecated public void updateAimlessModeStatistics(AimLessModeStat aimLessModeStat)
@Deprecated public void updateAimlessModeCongestionInfo(AimLessModeCongestionInfo aimLessModeCongestionInfo)
AMapNaviListener
连续5个点大于15km/h后开始回调。
Callback starts after 5 consecutive points greater than 15km/h.
注意:void OnUpdateTrafficFacility(AMapNaviTrafficFacilityInfo aMapNaviTrafficFacilityInfo);
/**
巡航模式(无路线规划)下,统计信息更新回调
Route calculation success callback.
/**
巡航模式(无路线规划)下,拥堵信息更新回调
Traffic jam information update callback in cruise mode (without route planning).
当前方无拥堵信息时,回调的AimLessModeCongestionInfo对象为空。
When there is no traffic jam information ahead, the callback AimLessModeCongestionInfo object is empty.
注意:该接口仅驾车模式有效
Note: This interface is only valid in driving mode
public void onPlayRing(int type)
AMapNaviListener
注意:该接口仅驾车模式有效
Note: This interface is only valid in driving mode
onPlayRing 在接口中 AMapNaviListenertype - 提示音类型,可以根据类型自定义播放声音
从5.5.0版本开始,提示音类型使用常量表示,具体类型可参考AMapNaviRingType
Starting from version 5.5.0, prompt sound types are represented by constants, specific types can be referenced in AMapNaviRingType
AMapNaviRingTypepublic void onCalculateRouteSuccess(AMapCalcRouteResult routeResult)
AMapNaviListenerAMapCalcRouteResult获取AMapCalcRouteResult.
可以通过CalcRouteResult获取算路错误码、算路类型以及路线id
Route calculation error code, route type, and route ID can be obtained through CalcRouteResult
onCalculateRouteSuccess 在接口中 AMapNaviListenerrouteResult - AMapCalcRouteResultpublic void onCalculateRouteFailure(AMapCalcRouteResult routeResult)
AMapNaviListenerAMapCalcRouteResult获取AMapCalcRouteResult
可以通过CalcRouteResult获取算路错误码、算路类型以及路线id
Route calculation error code, route type, and route ID can be obtained through CalcRouteResult
onCalculateRouteFailure 在接口中 AMapNaviListenerrouteResult - AMapCalcRouteResultpublic void onNaviRouteNotify(AMapNaviRouteNotifyData notifyData)
AMapNaviListener
注意:该接口仅驾车模式有效
Note: This interface is only valid in driving mode
导航过程中针对拥堵区域、限行区域、禁行区域、道路封闭等情况的躲避通知。
Avoidance notifications for traffic jam areas, restricted areas, prohibited areas, road closures, etc. during navigation.
通知和避让信息结果可以通过AMapNaviRouteNotifyData获取
Notification and avoidance information results can be obtained through AMapNaviRouteNotifyData
onNaviRouteNotify 在接口中 AMapNaviListenernotifyData - 通知和避让信息,详细信息请参考AMapNaviRouteNotifyDataAMapNaviRouteNotifyData for detailed informationpublic void onGpsSignalWeak(boolean isWeak)
AMapNaviListeneronGpsSignalWeak 在接口中 AMapNaviListenerisWeak - true: 信号弱;false:信号强public void onInnerNaviInfoUpdate(InnerNaviInfo mainRouteNaviInfo)
public void onInnerNaviInfoUpdate(InnerNaviInfo[] naviInfos)
public void onUpdateTmcStatus(NaviCongestionInfo tmcStatusInfo)
public void onStopNavi()
public void onSelectRouteId(int mainIndex)
public void updateBackupPath(NaviPath[] backupPath)
public void onSuggestChangePath(long newPathId,
long oldPathId,
int saveTime,
java.lang.String roadName)
public void onUpdateNaviPath()
public void onUpdateGpsSignalStrength(int strength)
public void onArrivedTravelWayPoint(int wayIndex)
onArrivedTravelWayPoint 在接口中 AMapNaviTravelListenerwayIndex - 到达途径点的编号,标号从0开始,依次累加。public void onUpdateDriveComfort(AMapNaviDriveComfort driveComfort)
注意:该接口仅驾车模式有效
Note: This interface is only valid for driving mode
onUpdateDriveComfort 在接口中 AMapNaviDriveListenerdriveComfort - 道路舒适度详细信息请参考AMapNaviDriveComfortAMapNaviDriveComfortpublic void onUpdateDriveEvent(AMapNaviDriveEvent driveEvent)
注意:该接口仅驾车模式有效
Note: This interface is only valid for driving mode
onUpdateDriveEvent 在接口中 AMapNaviDriveListenerdriveEvent - 三急事件详细信息请参考AMapNaviDriveEventAMapNaviDriveEventpublic void onUpdateNaviSpeedLimitSection(int speed)
onUpdateNaviSpeedLimitSection 在接口中 AMapNaviDriveListenerspeed - 限速值,限速值为0则隐藏路段限速信息public void onManeuverInfoUpdate(int iconType,
Bitmap iconBitmap)
AMapNaviDriveListeneronManeuverInfoUpdate 在接口中 AMapNaviDriveListenericonType - 导航转向图标类型值。参见IconTypeIconTypeiconBitmap - 导航转向图标public void onNextManeuverInfoUpdate(int iconType,
Bitmap iconBitmap)
AMapNaviDriveListeneronNextManeuverInfoUpdate 在接口中 AMapNaviDriveListenericonType - 导航转向图标类型值。参见IconTypeIconTypeiconBitmap - 导航转向图标