Package com.baidu.navisdk.adapter
Class IBNaviListener
- java.lang.Object
-
- com.baidu.navisdk.adapter.IBNaviListener
-
public abstract class IBNaviListener extends java.lang.Object
导航事件监听类.- Since:
- 2018-11-19
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IBNaviListener.Action
static class
IBNaviListener.DayNightMode
日夜模式static class
IBNaviListener.MapStateMode
操作态和导航态
-
Constructor Summary
Constructors Constructor Description IBNaviListener()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
onArriveDestination()
到达目的地后回调函数void
onArrivedWayPoint(int index)
驾车路径导航到达某个途经点的回调函数void
onAutoScaleChanged(boolean isOpen)
智能比例尺修改回调void
onCarLogoToEndRedLineChanged(boolean isOpen)
终点连线修改回调void
onDayNightChanged(IBNaviListener.DayNightMode style)
日夜模式改变void
onDiyVoiceModeChanged(int mode)
DIY播报内容模式修改回调void
onEnlargeMapUpdate(IBNaviListener.Action action, View enlargeMap, java.lang.String remainDistance, int progress, java.lang.String roadName, Bitmap turnIcon, SpannableStringBuilder stringBuilder)
放大图回调接口void
onFastExitWayInfoUpdate(IBNaviListener.Action action, java.lang.String name, int dist, java.lang.String id)
Deprecated.void
onFullViewModeChanged(int mode)
路况条修改回调void
onGuideInfoUpdate(BNaviInfo naviInfo, GuidePanelMessage guidePanelMessage)
诱导信息void
onGuideModeChanged(int mode)
显示模式修改回调void
onGuideViewModeChanged(int mode)
导航视角模式修改回调void
onHeavyTraffic()
导航中前方一公里出现严重拥堵的回调void
onHighWayInfoUpdate(IBNaviListener.Action action, BNHighwayInfo info)
高速信息void
onLaneInfoUpdate(IBNaviListener.Action action, java.util.List<BNavLineItem> laneItems)
车道线信息更新void
onLocationChange(BNaviLocation naviLocation)
当GPS位置有更新时的回调函数 注:自v5.3.0.1版本之后,该接口返回的坐标系跟随初始化时设置的坐标系void
onMainRouteChange(int type)
主路线发生变化的回调void
onMainSideBridgeUpdate(int type)
主辅路、高架桥信息更新void
onMapStateChange(IBNaviListener.MapStateMode mapStateMode)
底图操作态和导航态的回调void
onNaviGuideEnd()
导航结束的回调void
onNotificationShow(java.lang.String msg)
导航中通知型消息的回调void
onOverSpeed(int speed, int speedLimit)
超速回调,1km内超速回调一次void
onPreferChanged(int preferType)
偏好修改回调void
onRemainInfoUpdate(int remainDistance, int remainTime)
距离目的地的剩余距离void
onRemainLightsUpdate(int remainLights, int viaRemainLights)
导航中红绿灯更新void
onRoadConditionInfoUpdate(double progress, java.util.List<BNRoadCondition> items)
路况信息更新void
onRoadEnlargeViewChanged(boolean isOpen)
路口放大图修改回调void
onRoadNameUpdate(java.lang.String name)
当前路名更新void
onRouteForceSwitch(java.lang.String reason, long currentTimeMillis, int remainDistance, BNaviLocation location)
导航中服务主动推送更优路线,发生路线变化的回调void
onSpeedUpdate(int speed, int speedLimit)
速度信息回调,无数据返回 -1void
onStartYawing(java.lang.String flag)
开始偏航的回调void
onViaListRemainInfoUpdate(int[] remainDists, int[] remainTimes)
途径点eta信息void
onVoiceModeChanged(int mode)
语音播报修改回调void
onYawingArriveViaPoint(int index)
导航到达途径点附近偏航之后途径点消失的回调void
onYawingSuccess()
偏航成功的回调
-
-
-
Method Detail
-
onRoadNameUpdate
public void onRoadNameUpdate(java.lang.String name)
当前路名更新- Parameters:
name
- 当前道路名
-
onRemainInfoUpdate
public void onRemainInfoUpdate(int remainDistance, int remainTime)
距离目的地的剩余距离- Parameters:
remainDistance
- 剩余距离,单位米remainTime
- 剩余时间,单位秒
-
onViaListRemainInfoUpdate
public void onViaListRemainInfoUpdate(int[] remainDists, int[] remainTimes)
途径点eta信息- Parameters:
remainDists
- 剩余距离remainTimes
- 剩余时间
-
onGuideInfoUpdate
public void onGuideInfoUpdate(BNaviInfo naviInfo, GuidePanelMessage guidePanelMessage)
诱导信息- Parameters:
naviInfo
- 对应的诱导信息
-
onHighWayInfoUpdate
public void onHighWayInfoUpdate(IBNaviListener.Action action, BNHighwayInfo info)
高速信息- Parameters:
action
- SHOW: 展示 HIDE: 消隐 UPDATE: 更新信息info
- 对应的高速信息
-
onFastExitWayInfoUpdate
public void onFastExitWayInfoUpdate(IBNaviListener.Action action, java.lang.String name, int dist, java.lang.String id)
Deprecated.快速路出口信息- Parameters:
action
- SHOW: 展示 HIDE: 消隐 UPDATE: 更新信息name
- 快速路名称dist
- 离快速路出口的距离id
- 快速路ID
-
onEnlargeMapUpdate
public void onEnlargeMapUpdate(IBNaviListener.Action action, View enlargeMap, java.lang.String remainDistance, int progress, java.lang.String roadName, Bitmap turnIcon, SpannableStringBuilder stringBuilder)
放大图回调接口- Parameters:
action
- 显示/刷新/隐藏动作enlargeMap
- 放大图ViewremainDistance
- 剩余距离progress
- 路口的进度roadName
- 下一个路名turnIcon
- 转向标stringBuilder
- 放大图头部信息
-
onDayNightChanged
public void onDayNightChanged(IBNaviListener.DayNightMode style)
日夜模式改变- Parameters:
style
- DayNightMode.DAY: 白天 DayNightMode.NIGHT: 黑夜
-
onRoadConditionInfoUpdate
public void onRoadConditionInfoUpdate(double progress, java.util.List<BNRoadCondition> items)
路况信息更新- Parameters:
progress
- 车行驶的进度 单位为浮点类型,0-1为0%-100%items
- 路况信息
-
onMainSideBridgeUpdate
public void onMainSideBridgeUpdate(int type)
主辅路、高架桥信息更新- Parameters:
type
-BNaviCommonParams.BNMainSideBridge
-
onLaneInfoUpdate
public void onLaneInfoUpdate(IBNaviListener.Action action, java.util.List<BNavLineItem> laneItems)
车道线信息更新- Parameters:
action
- Action.SHOW:显示 Action.HIDE:消隐laneItems
- 车道线数据
-
onSpeedUpdate
public void onSpeedUpdate(int speed, int speedLimit)
速度信息回调,无数据返回 -1- Parameters:
speed
- 车速 km/hspeedLimit
- 限速 km/h
-
onOverSpeed
public void onOverSpeed(int speed, int speedLimit)
超速回调,1km内超速回调一次- Parameters:
speed
- 车速 km/hspeedLimit
- 限速 km/h
-
onArriveDestination
public void onArriveDestination()
到达目的地后回调函数
-
onArrivedWayPoint
public void onArrivedWayPoint(int index)
驾车路径导航到达某个途经点的回调函数
-
onLocationChange
public void onLocationChange(BNaviLocation naviLocation)
当GPS位置有更新时的回调函数 注:自v5.3.0.1版本之后,该接口返回的坐标系跟随初始化时设置的坐标系
-
onMapStateChange
public void onMapStateChange(IBNaviListener.MapStateMode mapStateMode)
底图操作态和导航态的回调
-
onStartYawing
public void onStartYawing(java.lang.String flag)
开始偏航的回调
-
onYawingSuccess
public void onYawingSuccess()
偏航成功的回调
-
onYawingArriveViaPoint
public void onYawingArriveViaPoint(int index)
导航到达途径点附近偏航之后途径点消失的回调- Parameters:
index
- 被删除途径点的索引
-
onNotificationShow
public void onNotificationShow(java.lang.String msg)
导航中通知型消息的回调
-
onHeavyTraffic
public void onHeavyTraffic()
导航中前方一公里出现严重拥堵的回调
-
onNaviGuideEnd
public void onNaviGuideEnd()
导航结束的回调
-
onMainRouteChange
public void onMainRouteChange(int type)
主路线发生变化的回调- Parameters:
type
- 路线变化原因 IBNOuterSettingParams.RouteChangeType
-
onPreferChanged
public void onPreferChanged(int preferType)
偏好修改回调- Parameters:
preferType
- 当前偏好
-
onGuideModeChanged
public void onGuideModeChanged(int mode)
显示模式修改回调- Parameters:
mode
- 当前偏好:0:经典 1:简约
-
onGuideViewModeChanged
public void onGuideViewModeChanged(int mode)
导航视角模式修改回调- Parameters:
mode
- 当前偏好:0:跟随车头 1:正北朝上
-
onVoiceModeChanged
public void onVoiceModeChanged(int mode)
语音播报修改回调- Parameters:
mode
- 0:标准 1:简洁 2:静音 3:仅提示音
-
onDiyVoiceModeChanged
public void onDiyVoiceModeChanged(int mode)
DIY播报内容模式修改回调- Parameters:
mode
- 0:标准 1:简洁 6:静音 7:仅提示音
-
onFullViewModeChanged
public void onFullViewModeChanged(int mode)
路况条修改回调- Parameters:
mode
- 0:全览图 1:路况条 2:不显示
-
onAutoScaleChanged
public void onAutoScaleChanged(boolean isOpen)
智能比例尺修改回调- Parameters:
isOpen
- 是否打开
-
onRoadEnlargeViewChanged
public void onRoadEnlargeViewChanged(boolean isOpen)
路口放大图修改回调- Parameters:
isOpen
- 是否打开
-
onCarLogoToEndRedLineChanged
public void onCarLogoToEndRedLineChanged(boolean isOpen)
终点连线修改回调- Parameters:
isOpen
- 是否打开
-
onRouteForceSwitch
public void onRouteForceSwitch(java.lang.String reason, long currentTimeMillis, int remainDistance, BNaviLocation location)
导航中服务主动推送更优路线,发生路线变化的回调- Parameters:
reason
- 路线变更原因currentTimeMillis
- 路线变化时间点remainDistance
- 路线发生变化后的剩余里程location
- 路线发生变更的位置
-
onRemainLightsUpdate
public void onRemainLightsUpdate(int remainLights, int viaRemainLights)
导航中红绿灯更新- Parameters:
remainLights
- 终点红绿灯viaRemainLights
- 下一个途径点红绿灯
-
-