public class WalkNavigateHelper
extends java.lang.Object
限定符和类型 | 方法和说明 |
---|---|
void |
addMoreNPCModelOnClickListener(IWMoreNPCModelOnClickListener moreNPCModelOnClickListener)
设置更多Npc模型面板入口的点击事件监听
|
void |
addNPCLoadAndInitListener(IWNPCLoadAndInitListener npcLoadAndInitListener)
设置Npc模型加载和初始化状态监听
|
java.util.List<Polyline> |
displayRoutePlanResult(MapView mapView,
MultiRouteDisplayOption multiRouteDisplayOption)
展示步行多路线接口
|
static WalkNavigateHelper |
getInstance()
获取WalkNavigateHelper实例
|
MapView |
getNaviMap()
获取步行导航底图对象
|
java.util.ArrayList<BaseNpcModel> |
getWalkNpcModelInfoList()
获取全部的Npc模型信息,包含默认的经典和图图模型
|
boolean |
hasIndoorRoute()
判断是否路线规划结果中包含室内路线
|
void |
initNaviEngine(Activity context,
IWEngineInitListener engineInitListener)
初始化导航引擎
|
void |
naviCalcRoute(int routeIndex,
IWNaviCalcRouteListener naviCalcRouteListener)
引擎算路接口
|
View |
onCreate(Activity activity)
获取导航View
|
void |
pause()
导航过程生命周期函数, 暂停导航
|
void |
quit()
导航过程生命周期函数, 结束导航
|
void |
resume()
导航过程生命周期函数, 恢复导航
|
void |
routePlanWithParams(WalkNaviLaunchParam param,
IWRoutePlanListener routePlanListener)
|
void |
routePlanWithRouteNode(WalkNaviLaunchParam param,
IWRoutePlanListener routePlanListener)
开始算路
|
void |
setRouteGuidanceListener(Activity activity,
IWRouteGuidanceListener routeGuidanceListener)
设置诱导监听, 获取诱导信息
|
void |
setTTsPlayer(IWTTSPlayer ttsPlayer)
设置语音诱导监听, 获取语音诱导文本信息
|
void |
setWalkNaviDisplayOption(WalkNaviDisplayOption walkNaviDisplayOption)
设置步行导航中的UI展示控制参数,该方法需要在
onCreate(Activity) 方法之前调用才能生效 |
void |
setWalkNaviStatusListener(IWNaviStatusListener listener)
设置导航状态监听,监听退出步行导航或步行导航模式改变
|
void |
setWalkNpcModelInfoList(java.util.ArrayList<BaseNpcModel> walkNpcModelInfoList)
设置Npc模型列表信息
|
void |
startCameraAndSetMapView(Activity activity)
开启步行导航AR模式Camera视图
|
boolean |
startWalkNavi(Activity activity)
导航过程生命周期函数, 开始导航
|
void |
switchNPCModel(BaseNpcModel baseNpcModel)
切换Npc模型
|
void |
switchWalkNaviMode(Activity activity,
int mode,
WalkNaviModeSwitchListener listener)
步行导航模式切换,普通/AR
|
void |
triggerLocation(WLocData locData)
外部传入GPS坐标点数据
|
void |
unInitNaviEngine()
释放导航引擎
|
public static WalkNavigateHelper getInstance()
public void initNaviEngine(Activity context, IWEngineInitListener engineInitListener)
engineInitListener
- 导航引擎回调接口public void unInitNaviEngine()
public void routePlanWithRouteNode(WalkNaviLaunchParam param, IWRoutePlanListener routePlanListener)
param
- 算路参数:起终点距离小于30米或大于50千米,默认不进入导航routePlanListener
- 算路结果回调public void routePlanWithParams(WalkNaviLaunchParam param, IWRoutePlanListener routePlanListener)
routePlanWithRouteNode(com.baidu.mapapi.walknavi.params.WalkNaviLaunchParam, com.baidu.mapapi.walknavi.adapter.IWRoutePlanListener)
代替param
- 算路参数:起终点距离小于30米或大于50千米,默认不进入导航routePlanListener
- 算路结果回调public View onCreate(Activity activity)
activity
- public boolean startWalkNavi(Activity activity)
public void switchWalkNaviMode(Activity activity, int mode, WalkNaviModeSwitchListener listener)
public void naviCalcRoute(int routeIndex, IWNaviCalcRouteListener naviCalcRouteListener)
routeIndex
- public java.util.List<Polyline> displayRoutePlanResult(MapView mapView, MultiRouteDisplayOption multiRouteDisplayOption)
mapView
- 外部传入的mapview实例multiRouteDisplayOption
- 路线绘制配置选项public void startCameraAndSetMapView(Activity activity)
public boolean hasIndoorRoute()
public void setRouteGuidanceListener(Activity activity, IWRouteGuidanceListener routeGuidanceListener)
routeGuidanceListener
- 诱导监听事件public void setWalkNaviStatusListener(IWNaviStatusListener listener)
listener
- public void setTTsPlayer(IWTTSPlayer ttsPlayer)
ttsPlayer
- 语音诱导监听事件public void triggerLocation(WLocData locData)
locData
- public void setWalkNaviDisplayOption(WalkNaviDisplayOption walkNaviDisplayOption)
onCreate(Activity)
方法之前调用才能生效walkNaviDisplayOption
- UI展示控制参数public void setWalkNpcModelInfoList(java.util.ArrayList<BaseNpcModel> walkNpcModelInfoList)
walkNpcModelInfoList
- Npc模型列表public java.util.ArrayList<BaseNpcModel> getWalkNpcModelInfoList()
public void switchNPCModel(BaseNpcModel baseNpcModel)
baseNpcModel
- Npc模型public void addMoreNPCModelOnClickListener(IWMoreNPCModelOnClickListener moreNPCModelOnClickListener)
moreNPCModelOnClickListener
- public void addNPCLoadAndInitListener(IWNPCLoadAndInitListener npcLoadAndInitListener)
npcLoadAndInitListener
- public MapView getNaviMap()
public void pause()
public void resume()
public void quit()