Package com.baidu.navisdk.adapter
Interface IBNRoutePlanManager
-
public interface IBNRoutePlanManager
路线规划相关接口
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
IBNRoutePlanManager.RouteLinkDataListener
static interface
IBNRoutePlanManager.RoutePlanPreference
路线规划偏好策略static interface
IBNRoutePlanManager.SelectRouteListener
static interface
IBNRoutePlanManager.SubVehicle
车辆子类型static interface
IBNRoutePlanManager.Vehicle
车辆类型
-
Field Summary
Fields Modifier and Type Field Description static int
MSG_NAVI_ROUTE_PLAN_CANCELED
算路取消static int
MSG_NAVI_ROUTE_PLAN_FAILED
路线规划失败消息static int
MSG_NAVI_ROUTE_PLAN_START
路线规划开始消息static int
MSG_NAVI_ROUTE_PLAN_SUCCESS
路线规划成功消息static int
MSG_NAVI_ROUTE_PLAN_TO_NAVI
路线规划进导航
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BNRoutePlanInfos
getRoutePlanInfo()
获取3Tab信息和路线详情 这是一个耗时操作,建议在子线程执行 数组下标为路线IDint
getSelectRouteId()
获取当前选中的路线ID 该ID和getRoutePlanInfo中下标一一对应void
removeRequestByHandler(Handler handler)
通过handler移除算路请求boolean
routePlan(java.util.List<BNRoutePlanNode> nodes, int preference, Bundle extBundle, Handler outHandler)
根据指定参数进行路线规划,并返回结果void
selectRoute(int routeId, IBNRoutePlanManager.SelectRouteListener selectRouteListener)
通过路线ID选择路线进行导航 路线ID为getRoutePlanInfo返回路线数据的数组下标void
setAvoidBlockedRoad(boolean isAvoid)
设置算路避开封闭道路 默认false,不避开封闭道路。void
setRouteLinkDataListener(IBNRoutePlanManager.RouteLinkDataListener listener)
void
setRoutePlanTime(java.util.Date data)
设置未来出行时间void
setViaPreferRoutePlanEnable(boolean enable)
是否打开途径点偏好算路
-
-
-
Field Detail
-
MSG_NAVI_ROUTE_PLAN_START
static final int MSG_NAVI_ROUTE_PLAN_START
路线规划开始消息- See Also:
- Constant Field Values
-
MSG_NAVI_ROUTE_PLAN_CANCELED
static final int MSG_NAVI_ROUTE_PLAN_CANCELED
算路取消- See Also:
- Constant Field Values
-
MSG_NAVI_ROUTE_PLAN_SUCCESS
static final int MSG_NAVI_ROUTE_PLAN_SUCCESS
路线规划成功消息- See Also:
- Constant Field Values
-
MSG_NAVI_ROUTE_PLAN_FAILED
static final int MSG_NAVI_ROUTE_PLAN_FAILED
路线规划失败消息- See Also:
- Constant Field Values
-
MSG_NAVI_ROUTE_PLAN_TO_NAVI
static final int MSG_NAVI_ROUTE_PLAN_TO_NAVI
路线规划进导航- See Also:
- Constant Field Values
-
-
Method Detail
-
routePlan
boolean routePlan(java.util.List<BNRoutePlanNode> nodes, int preference, Bundle extBundle, Handler outHandler)
根据指定参数进行路线规划,并返回结果- Parameters:
nodes
- 路线规划节点,目前仅支持size=2的节点,即一个起点,一个终点preference
- 路线规划偏好策略extBundle
- 扩展参数,暂无,可传nulloutHandler
- 路线规划消息接收- Returns:
- 接口执行结果,返回成功不代表算路成功
-
removeRequestByHandler
void removeRequestByHandler(Handler handler)
通过handler移除算路请求- Parameters:
handler
-
-
getRoutePlanInfo
BNRoutePlanInfos getRoutePlanInfo()
获取3Tab信息和路线详情 这是一个耗时操作,建议在子线程执行 数组下标为路线ID- Returns:
-
getSelectRouteId
int getSelectRouteId()
获取当前选中的路线ID 该ID和getRoutePlanInfo中下标一一对应- Returns:
-
setRoutePlanTime
void setRoutePlanTime(java.util.Date data)
设置未来出行时间
-
selectRoute
void selectRoute(int routeId, IBNRoutePlanManager.SelectRouteListener selectRouteListener)
通过路线ID选择路线进行导航 路线ID为getRoutePlanInfo返回路线数据的数组下标- Parameters:
routeId
-
-
setViaPreferRoutePlanEnable
void setViaPreferRoutePlanEnable(boolean enable)
是否打开途径点偏好算路- Parameters:
enable
-
-
setRouteLinkDataListener
void setRouteLinkDataListener(IBNRoutePlanManager.RouteLinkDataListener listener)
-
setAvoidBlockedRoad
void setAvoidBlockedRoad(boolean isAvoid)
设置算路避开封闭道路 默认false,不避开封闭道路。
-
-