| 程序包 | 说明 |
|---|---|
| com.amap.api.navi |
导航基础包,提供路径规划、导航等基础功能。
|
| 限定符和类型 | 方法和说明 |
|---|---|
AmapNaviParams |
AmapNaviParams.setBroadcastMode(Context context,
int mode)
设置播报模式
Set broadcast mode |
AmapNaviParams |
AmapNaviParams.setCarDirectionMode(Context context,
int mode)
设置导航视角
Set navigation perspective |
AmapNaviParams |
AmapNaviParams.setCarInfo(AMapCarInfo carInfo)
设置车辆信息,进行尾号限行与货车导航
Set vehicle information for tail number restriction and truck navigation |
AmapNaviParams |
AmapNaviParams.setDayAndNightMode(Context context,
int mode)
设置导航页面昼夜模式
Set day and night mode for navigation page |
AmapNaviParams |
AmapNaviParams.setMultipleRouteNaviMode(boolean multipleRouteNaviMode)
设置多路线导航模式(导航中拥有若干条备选路线供用户选择), 或单路线导航模式(默认模式)
Set multi-route navigation mode (navigation with several alternative routes for user selection), or single-route navigation mode (default mode). |
AmapNaviParams |
AmapNaviParams.setNaviMode(int naviType)
设置直接导航模式(仅在使用组件直接导航(不调起算路页面)时生效)
Set direct navigation mode (only effective when using component direct navigation (without calling up the route calculation page)) |
AmapNaviParams |
AmapNaviParams.setNeedCalculateRouteWhenPresent(boolean needCalculateRouteWhenPresent)
启动组件进行直接导航时,设置是否进行算路 (只有在直接跳转导航页的情况下才生效)
When starting the component for direct navigation, set whether to calculate the route (only effective when directly jumping to the navigation page) |
AmapNaviParams |
AmapNaviParams.setNeedDestroyDriveManagerInstanceWhenNaviExit(boolean destroy)
设置退出导航组件是否销毁导航实例
Set whether to destroy navigation instance when exiting navigation component |
AmapNaviParams |
AmapNaviParams.setRouteStrategy(int routeStrategy)
设置组件规划路线的策略,默认为
PathPlanningStrategy.DRIVING_MULTIPLE_ROUTES_DEFAULT,速度优先+躲避拥堵+距离较短Set the route planning strategy for the component, default is PathPlanningStrategy.DRIVING_MULTIPLE_ROUTES_DEFAULT, speed priority + avoid congestion + shorter distance |
AmapNaviParams |
AmapNaviParams.setScaleAutoChangeEnable(Context context,
boolean enable)
设置比例尺智能缩放是否开启
Set whether scale intelligent zoom is enabled |
AmapNaviParams |
AmapNaviParams.setSecondActionVisible(boolean visible)
设置组件导航页是否显示下下个路口引导,默认不显示
Set whether the component navigation page shows guidance for the next-next intersection, default is not displayed. |
AmapNaviParams |
AmapNaviParams.setShowCrossImage(boolean showCrossImage)
设置驾车导航时是否显示路口放大图
Set whether to show intersection enlargement image during driving navigation |
AmapNaviParams |
AmapNaviParams.setShowExitNaviDialog(boolean showExitNaviDialog)
设置退出导航组件是否显示退出弹框
Set whether to show exit dialog when exiting navigation component |
AmapNaviParams |
AmapNaviParams.setShowRouteStrategyPreferenceView(boolean showRouteStrategyPreferenceView)
表示设置路径规划偏好策略页面是否显示
Indicates whether the route planning preference strategy page is displayed |
AmapNaviParams |
AmapNaviParams.setShowVoiceSetings(boolean showVoiceAssistEnable)
设置是否展示导航语音播报设置项
Set whether to show navigation voice broadcast settings |
AmapNaviParams |
AmapNaviParams.setTheme(AmapNaviTheme theme)
设置组件主题
Set component theme. |
AmapNaviParams |
AmapNaviParams.setTrafficEnabled(boolean enable)
导航组件路况开关是否打开
Whether the navigation component traffic condition switch is turned on |
AmapNaviParams |
AmapNaviParams.setTruckMultipleRouteNaviMode(boolean truckMultipleRouteNaviMode)
设置货车多路线导航模式(导航中拥有若干条备选路线供用户选择), 或单路线导航模式(默认模式)
Set truck multi-route navigation mode (navigation with several alternative routes for user selection), or single-route navigation mode (default mode). |
AmapNaviParams |
AmapNaviParams.setUseInnerVoice(boolean isUseInnerVoice)
设置是否使用内部语音播报
Set whether to use internal voice broadcast |
AmapNaviParams |
AmapNaviParams.showEagleMap(Context context,
boolean showEagleMap) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
AmapNaviPage.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 |
AmapNaviPage.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. |