public class AmapNaviParams
extends java.lang.Object
构造器和说明 |
---|
AmapNaviParams() |
AmapNaviParams(com.amap.api.maps.model.Poi end)
构造驾车算路参数,传入终点进行算路。
|
AmapNaviParams(com.amap.api.maps.model.Poi start,
java.util.List<com.amap.api.maps.model.Poi> wayPoint,
com.amap.api.maps.model.Poi end,
AmapNaviType type)
构造算路参数,可传入起点,途径点(3个),终点,算路类型等,目前只支持驾车算路。
|
AmapNaviParams(com.amap.api.maps.model.Poi start,
java.util.List<com.amap.api.maps.model.Poi> wayPoint,
com.amap.api.maps.model.Poi end,
AmapNaviType type,
AmapPageType pageType)
构造算路参数,可传入起点,途径点(3个),终点,算路类型等,目前只支持驾车算路。
|
限定符和类型 | 方法和说明 |
---|---|
AMapCarInfo |
getCarInfo()
获取设置的货车参数对象
|
boolean |
getIsUseInnerVoice()
获取是否使用内部语音播报
注意:6.1.0版本开始,默认值改为true
|
int |
getRouteStrategy()
获取设置组件规划路线的策略
|
boolean |
isNeedCalculateRouteWhenPresent()
获取启动导航组件是否进行算路
|
boolean |
isNeedDestroyDriveManagerInstanceWhenNaviExit()
获取退出导航组件是否销毁导航实例
|
boolean |
isShowCrossImage()
驾车导航时是否显示路口放大图
|
boolean |
isShowExitNaviDialog()
获取退出导航组件是否显示退出弹框
|
boolean |
isShowRouteStrategyPreferenceView()
设置路径规划偏好策略页面是否显示
|
boolean |
isTrafficEnabled()
导航组件路况开关是否打开
|
AmapNaviParams |
setBroadcastMode(Context context,
int mode)
设置播报模式
|
AmapNaviParams |
setCarDirectionMode(Context context,
int mode)
设置导航视角
|
AmapNaviParams |
setCarInfo(AMapCarInfo carInfo)
设置车辆信息,进行尾号限行与货车导航
|
AmapNaviParams |
setDayAndNightMode(Context context,
int mode)
设置导航页面昼夜模式
|
AmapNaviParams |
setMultipleRouteNaviMode(boolean multipleRouteNaviMode)
设置多路线导航模式(导航中拥有若干条备选路线供用户选择), 或单路线导航模式(默认模式).
|
AmapNaviParams |
setNaviMode(int naviType)
设置直接导航模式(仅在使用组件直接导航(不调起算路页面)时生效)
|
AmapNaviParams |
setNeedCalculateRouteWhenPresent(boolean needCalculateRouteWhenPresent)
启动组件进行直接导航时,设置是否进行算路 (只有在直接跳转导航页的情况下才生效)
|
AmapNaviParams |
setNeedDestroyDriveManagerInstanceWhenNaviExit(boolean destroy)
设置退出导航组件是否销毁导航实例
|
AmapNaviParams |
setRouteStrategy(int routeStrategy)
设置组件规划路线的策略,默认为
PathPlanningStrategy.DRIVING_MULTIPLE_ROUTES_DEFAULT ,速度优先+躲避拥堵+距离较短 |
AmapNaviParams |
setScaleAutoChangeEnable(Context context,
boolean enable)
设置比例尺智能缩放是否开启
|
AmapNaviParams |
setSecondActionVisible(boolean visible)
设置组件导航页是否显示下下个路口引导,默认不显示
注意:该接口仅驾车模式有效
|
AmapNaviParams |
setShowCrossImage(boolean showCrossImage)
设置驾车导航时是否显示路口放大图
|
AmapNaviParams |
setShowExitNaviDialog(boolean showExitNaviDialog)
设置退出导航组件是否显示退出弹框
|
AmapNaviParams |
setShowRouteStrategyPreferenceView(boolean showRouteStrategyPreferenceView)
表示设置路径规划偏好策略页面是否显示
|
AmapNaviParams |
setShowVoiceSetings(boolean showVoiceAssistEnable)
设置是否展示导航语音播报设置项
|
AmapNaviParams |
setTheme(AmapNaviTheme theme)
|
AmapNaviParams |
setTrafficEnabled(boolean enable)
导航组件路况开关是否打开
|
AmapNaviParams |
setTruckMultipleRouteNaviMode(boolean truckMultipleRouteNaviMode)
设置货车多路线导航模式(导航中拥有若干条备选路线供用户选择), 或单路线导航模式(默认模式)。
|
AmapNaviParams |
setUseInnerVoice(boolean isUseInnerVoice)
设置是否使用内部语音播报
|
AmapNaviParams |
showEagleMap(Context context,
boolean showEagleMap) |
boolean |
showVoiceAssistEnable()
是否展示导航语音播报设置项
|
public AmapNaviParams()
public AmapNaviParams(com.amap.api.maps.model.Poi end)
end
- 终点坐标public AmapNaviParams(com.amap.api.maps.model.Poi start, java.util.List<com.amap.api.maps.model.Poi> wayPoint, com.amap.api.maps.model.Poi end, AmapNaviType type)
start
- 起点坐标wayPoint
- 途径点坐标集合,最多3个途径点end
- 终点坐标type
- 算路类型。目前只开放驾车,参考AmapNaviType
public AmapNaviParams(com.amap.api.maps.model.Poi start, java.util.List<com.amap.api.maps.model.Poi> wayPoint, com.amap.api.maps.model.Poi end, AmapNaviType type, AmapPageType pageType)
start
- 起点坐标wayPoint
- 途径点坐标集合,最多3个途径点end
- 终点坐标type
- 算路类型。目前只开放驾车,参考AmapNaviType
pageType
- 页面类型,可选择是跳转到规划页还是导航页,枚举参考AmapPageType
public AmapNaviParams setNaviMode(int naviType)
naviType
- 1-实时导航 2-模拟导航public AmapNaviParams setTheme(AmapNaviTheme theme)
目前支持的的主题有三种:
蓝色(默认主题):AmapNaviTheme.BLUE
白色:AmapNaviTheme.WHITE
黑色:AmapNaviTheme.BLACK
theme
- public boolean isNeedCalculateRouteWhenPresent()
public AmapNaviParams setNeedCalculateRouteWhenPresent(boolean needCalculateRouteWhenPresent)
needCalculateRouteWhenPresent
- true : 算路,false : 启动组件以后不会算路直接开启导航。默认为true。public boolean isNeedDestroyDriveManagerInstanceWhenNaviExit()
public AmapNaviParams setNeedDestroyDriveManagerInstanceWhenNaviExit(boolean destroy)
destroy
- true-退出导航页时停止导航,退出组件时销毁导航
false-退出组件不会销毁导航;当使用组件直接导航时,退出导航页也不会停止导航public boolean isShowExitNaviDialog()
public AmapNaviParams setShowExitNaviDialog(boolean showExitNaviDialog)
showExitNaviDialog
- public AMapCarInfo getCarInfo()
public AmapNaviParams setCarInfo(AMapCarInfo carInfo)
carInfo
- AMapCarInfo
public AmapNaviParams setUseInnerVoice(boolean isUseInnerVoice)
isUseInnerVoice
- 是否使用内部语音播报
注意:6.1.0版本开始,默认值改为truepublic boolean getIsUseInnerVoice()
public int getRouteStrategy()
public AmapNaviParams setRouteStrategy(int routeStrategy)
PathPlanningStrategy.DRIVING_MULTIPLE_ROUTES_DEFAULT
,速度优先+躲避拥堵+距离较短routeStrategy
- PathPlanningStrategy
public boolean isShowCrossImage()
public AmapNaviParams setShowCrossImage(boolean showCrossImage)
showCrossImage
- public boolean isShowRouteStrategyPreferenceView()
public AmapNaviParams setShowRouteStrategyPreferenceView(boolean showRouteStrategyPreferenceView)
showRouteStrategyPreferenceView
- public AmapNaviParams setTrafficEnabled(boolean enable)
enable
- 默认为falsepublic boolean isTrafficEnabled()
public AmapNaviParams setMultipleRouteNaviMode(boolean multipleRouteNaviMode)
multipleRouteNaviMode
- true:多路线导航模式, false:单路线导航模式 默认为truepublic AmapNaviParams setTruckMultipleRouteNaviMode(boolean truckMultipleRouteNaviMode)
truckMultipleRouteNaviMode
- true:多路线导航模式,false:单路线导航模式(默认)public AmapNaviParams setSecondActionVisible(boolean visible)
注意:该接口仅驾车模式有效
visible
- true-显示,false-隐藏public AmapNaviParams setDayAndNightMode(Context context, int mode)
mode
- 0-自动切换 1-白天 2-夜间public AmapNaviParams setBroadcastMode(Context context, int mode)
context
- mode
- 1-简洁播报 2-详细播报 3-静音模式public AmapNaviParams setCarDirectionMode(Context context, int mode)
context
- mode
- 1-正北向上 2-车头向上public AmapNaviParams setScaleAutoChangeEnable(Context context, boolean enable)
context
- enable
- public boolean showVoiceAssistEnable()
public AmapNaviParams setShowVoiceSetings(boolean showVoiceAssistEnable)
public AmapNaviParams showEagleMap(Context context, boolean showEagleMap)