public class AmapNaviPage
extends java.lang.Object
| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
TAG |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addMarker(AMapNaviMarkerOptions markerOptions)
在驾车导航界面添加自定义标注
Add custom markers in driving navigation interface. |
static void |
destroy()
已过时。
|
void |
exitRouteActivity()
退出导航组件
Exit navigation component |
INaviInfoCallback |
getCallback() |
int |
getEngineType()
获取引擎类型
Get engine type |
static AmapNaviPage |
getInstance() |
AmapNaviType |
getNaviType()
获取导航类型
Get navigation type |
int |
getRouteStrategy()
获取驾车算路策略
Get driving route calculation strategy |
boolean |
isDrawBackUpOverlay()
是否绘制多备选路线 默认true
Whether to draw multiple alternative routes, default true |
boolean |
isDrawRestrictArea()
是否绘制限行图层 默认false
Whether to draw restriction layer, default false |
boolean |
isNaviPage()
是否直接进入导航页
Whether to enter navigation page directly |
boolean |
isSecondActionVisible()
组件导航中是否显示下下路口的转向引导
Whether to show turn guidance for the next-next intersection during component navigation |
boolean |
isShowCrossImage()
组件导航中是否显示路口大图
Whether to show intersection large image during component navigation |
boolean |
isShowRouteStrategyPreferenceView()
获取是否自定义了算路策略
Get whether route strategy is customized |
boolean |
isTrafficEnable()
获取路况开关是否打开
Get whether traffic condition switch is turned on |
boolean |
needCalculateRoute()
是否需要在导航页算路
Whether route calculation is needed on navigation page |
boolean |
needDestroyManagerOnExit()
是否需要在退出时销毁(退出导航页时停止导航,退出组件时销毁导航)
Whether to destroy when exiting (stop navigation when exiting navigation page, destroy navigation when exiting component) |
void |
onRouteActivityCreated(AmapRouteActivity activity)
组件Activity创建回调
Component Activity creation callback |
void |
onRouteActivityDestroyed()
组件Activity销毁回调
Component Activity destruction callback |
void |
removeMarker(AMapNaviMarkerOptions markerOptions)
在驾车导航界面移除自定义标注
Remove custom markers in driving navigation interface. |
boolean |
showExitNaviDialog()
退出导航页时是否显示退出确认弹框
Whether to show exit confirmation dialog when exiting navigation page |
void |
showRouteActivity(Context context,
AmapNaviParams params,
INaviInfoCallback callback)
调起导航组件功能
使用此功能后不能再使用AmapNavi对象的任何方法 Invoke navigation component function After using this function, you can no longer use any methods of the AmapNavi object. |
void |
showRouteActivity(Context context,
AmapNaviParams params,
INaviInfoCallback callback,
java.lang.Class<? extends AmapRouteActivity> targetClass)
调起导航组件功能
使用此功能后不能再使用AmapNavi对象的任何方法 Invoke navigation component function After using this function, you can no longer use any methods of the AmapNavi object. |
boolean |
showVoiceAssistEnable()
设置中是否展示音频控制项
Whether to show audio control items in settings |
void |
updateMarker(AMapNaviMarkerOptions markerOptions)
在驾车导航界面更新自定义标注
Update custom markers in driving navigation interface. |
public static final java.lang.String TAG
public static AmapNaviPage getInstance()
public static void destroy()
public INaviInfoCallback getCallback()
public void showRouteActivity(Context context,
AmapNaviParams params,
INaviInfoCallback callback)
context - 上下文params - 导航参数,不可为空callback - 回调方法,具体参见INaviInfoCallbackINaviInfoCallbackpublic void showRouteActivity(Context context,
AmapNaviParams params,
INaviInfoCallback callback,
java.lang.Class<? extends AmapRouteActivity> targetClass)
在特定activity中启动导航组件,需要保证自定义的activity继承我们的AmapRouteActivity,要在对应生命周期中调用super的方法
Start the navigation component in a specific activity. Need to ensure that the custom activity extends our AmapRouteActivity, and call super's method in the corresponding lifecycle
context - 上下文params - 导航参数,不可为空callback - 回调方法,具体参见INaviInfoCallbackINaviInfoCallbacktargetClass - 目标Activity,需要继承自AmapRouteActivitypublic void onRouteActivityCreated(AmapRouteActivity activity)
public void onRouteActivityDestroyed()
public void exitRouteActivity()
public void addMarker(AMapNaviMarkerOptions markerOptions)
注意:必须在组件Activity执行完onCreate之后调用才能生效。
Note: Must be called after the component Activity has finished executing onCreate to take effect.
markerOptions - public void updateMarker(AMapNaviMarkerOptions markerOptions)
注意:必须在组件Activity执行完onCreate之后调用才能生效。
Note: Must be called after the component Activity has finished executing onCreate to take effect.
markerOptions - public void removeMarker(AMapNaviMarkerOptions markerOptions)
注意:必须在组件Activity执行完onCreate之后调用才能生效。
Note: Must be called after the component Activity has finished executing onCreate to take effect.
public boolean isShowRouteStrategyPreferenceView()
public boolean isTrafficEnable()
public boolean isDrawBackUpOverlay()
public boolean isDrawRestrictArea()
public boolean needCalculateRoute()
public boolean needDestroyManagerOnExit()
public boolean showVoiceAssistEnable()
public boolean showExitNaviDialog()
public boolean isNaviPage()
public int getRouteStrategy()
public boolean isShowCrossImage()
public boolean isSecondActionVisible()
public int getEngineType()
public AmapNaviType getNaviType()