public class AMapHudView extends FrameLayout implements AMapNaviListener
当用户点击HUD界面,会出现HUD设置栏(包括:返回按钮和镜像按钮)。
When users click on the HUD interface, the HUD settings bar will appear (including: back button and mirror button).
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
getHudMenuEnabled()
返回 HUD设置栏是否显示
Returns whether the HUD settings bar is displayed. |
int |
getHudViewMode()
返回HUD显示模式,目前有正常、镜像两种显示模式
Returns the HUD display mode, currently with normal and mirror display modes. |
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 |
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)
算路成功回调
Route calculation success callback |
void |
onDestroy()
销毁AMapHudView
Destroy AMapHudView |
void |
onGetNavigationText(java.lang.String text)
导航播报信息回调函数
Navigation broadcast information callback function. |
void |
onNaviRouteNotify(AMapNaviRouteNotifyData notifyData)
导航过程中道路信息通知
Road information notification during navigation. |
void |
setHudMenuEnabled(java.lang.Boolean enabled)
HUD界面是否显示设置栏
Whether the HUD interface displays the settings bar. |
void |
setHudViewListener(AMapHudViewListener listener)
设置AMapHudViewListener监听
Set AMapHudViewListener listener |
void |
setHudViewMode(int mode)
设置HUD显示模式,目前仅支持设备全屏显示
Sets the HUD display mode, currently only supports full-screen display on devices. |
hideCross, hideLaneInfo, hideModeCross, notifyParallelRoad, onArriveDestination, onArrivedWayPoint, onCalculateRouteFailure, onEndEmulatorNavi, onGetNavigationText, onGpsOpenStatus, onGpsSignalWeak, onInitNaviFailure, onInitNaviSuccess, onLocationChange, onNaviInfoUpdate, onPlayRing, onReCalculateRouteForTrafficJam, onReCalculateRouteForYaw, onServiceAreaUpdate, onStartNavi, onTrafficStatusUpdate, OnUpdateTrafficFacility, OnUpdateTrafficFacility, showCross, showLaneInfo, showLaneInfo, showModeCross, updateAimlessModeCongestionInfo, updateCameraInfo, updateIntervalCameraInfopublic int getHudViewMode()
public void setHudViewMode(int mode)
mode - HUD显示模式,包括:AMapNaviViewOptions.HUD_NORMAL_SHOW(HUD正向显示)和AMapNaviViewOptions.HUD_MIRROR_SHOW(HUD镜像显示)。
AMapNaviViewOptions.HUD_NORMAL_SHOW (HUD forward display) and AMapNaviViewOptions.HUD_MIRROR_SHOW (HUD mirror display).public boolean getHudMenuEnabled()
public void setHudMenuEnabled(java.lang.Boolean enabled)
设置栏包含返回按钮和镜像按钮。用户点击HUD界面,显示设置栏,5秒未有操作,自动隐藏。
The settings bar contains a back button and a mirror button. When the user clicks the HUD interface, the settings bar is displayed, and it automatically hides after 5 seconds without operation.
enabled - true表示当用户点击屏幕时,会显示HUD设置栏,5秒未有操作,进行隐藏。public final void onDestroy()
public void setHudViewListener(AMapHudViewListener listener)
listener - AMapHudViewListener监听
public void onGetNavigationText(java.lang.String text)
onGetNavigationText 在接口中 AMapNaviListenertext - 播报文字。
public void onCalculateRouteSuccess(int[] routeIds)
onCalculateRouteSuccess 在接口中 AMapNaviListenerrouteIds - 路线id数组
public 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 information