方法详细资料
getPathId
public long getPathId()
获取线路ID
Get route ID
注意:该接口仅驾车模式有效
Note: This interface is only valid for driving mode
返回:
getExitDirectionInfo
public AMapExitDirectionInfo getExitDirectionInfo()
获取出口方向信息
Get exit direction information
返回:
出口方向信息 详情见AMapExitDirectionInfo
Exit direction information, see details in AMapExitDirectionInfo
注意:该接口仅驾车模式有效
Note: This interface is only valid for driving mode
从以下版本开始:
6.8.0
getCurrentSpeed
public int getCurrentSpeed()
已过时。 请从定位回调 AMapNaviListener.onLocationChange(AMapNaviLocation) 中获取当前车速
Please get current vehicle speed from location callback AMapNaviListener.onLocationChange(AMapNaviLocation)
获取当前的车速
Get current vehicle speed
返回:
车速 单位:km/h
Vehicle speed Unit: km/h
getNaviType
public int getNaviType()
导航信息类型
Navigation information type
返回:
1-实时导航 2-模拟导航
1-real-time navigation 2-simulated navigation
getCurrentRoadName
public java.lang.String getCurrentRoadName()
获取当前路线名称
Get current route name
返回:
当前路名
Current road name
getNextRoadName
public java.lang.String getNextRoadName()
获取下条路名
Get next road name
返回:
下条路名
Next road name
getIconType
public int getIconType()
获取导航转向图标类型
Get navigation turn icon type.
注意,当 NaviInfo.getIconBitmap() 有返回值的时候,请优先使用其返回的Bitmap来绘制转向图标,这样结果更加准确。
Note, when NaviInfo.getIconBitmap() has a return value, please use the returned Bitmap to draw the turn icon first, so the result will be more accurate.
返回:
导航转向图标类型值。参见IconType
Navigation turn icon type value. See IconType
getPathRetainDistance
public int getPathRetainDistance()
获取路线剩余距离
Get remaining distance of the route.
注意:该接口仅驾车模式有效
Note: This interface is only valid for driving mode
返回:
路线剩余距离
Remaining distance of the route
getPathRetainTime
public int getPathRetainTime()
获取路线剩余时间(单位秒)
Get remaining time of the route (unit: second)
返回:
路线剩余时间
Remaining time of the route
getCurStepRetainDistance
public int getCurStepRetainDistance()
获取当前路段剩余距离
Get remaining distance of the current segment.
注意:该接口仅驾车模式有效
Note: This interface is only valid for driving mode
返回:
getCurLinkRetainDistance
public int getCurLinkRetainDistance()
获取当前Link段剩余距离
Get the remaining distance of the current link segment
注意:该接口仅驾车模式有效
note:This interface is only valid for driving mode
返回:
getCurStepRetainTime
public int getCurStepRetainTime()
获取当前路段剩余时间
Get remaining time of the current segment.
注意:该接口仅驾车模式有效
Note: This interface is only valid for driving mode
返回:
当前路段剩余时间
Remaining time of the current segment
getCurStep
public int getCurStep()
获取当前大路段索引
Get current major segment index
返回:
当前大路段索引
Current major segment index
getCurLink
public int getCurLink()
获取自车所在小路段索引
Get current minor segment index of the vehicle
返回:
自车所在小路段索引
Current minor segment index of the vehicle
getCurPoint
public int getCurPoint()
获取当前位置所在link上的点索引
Get point index on the link where the current position is located
返回:
当前位置所在link上的点索引
Point index on the link where the current position is located
getIconBitmap
public Bitmap getIconBitmap()
获取转向图标bitmap
Get turn icon bitmap.
此接口可能返回为空,返回空的情况下,请使用 NaviInfo.getIconType() 来判别转向类型。请优先使用此接口来绘制转向图标。
This interface may return null. In case of null return, please use NaviInfo.getIconType() to determine the turn type. Please use this interface first to draw the turn icon.
注意:该接口仅驾车模式有效,从10.2.0开始矢量图、格栅图类型的转向图标都会转换为bitmap,该接口不会返回null
note: "This API is only valid in driving mode. Starting from version 10.2.0, turning icons for vector and grid map types will be converted to bitmap. This API will not return null."
返回:
转向图标bitmap
Turn icon bitmap
从以下版本开始:
6.4.0
getRouteRemainLightCount
public int getRouteRemainLightCount()
获取路径剩余红绿灯数量
Get number of remaining traffic lights on the route.
注意:该接口仅驾车模式有效
Note: This interface is only valid for driving mode
返回:
setRouteRemainLightCount
public void setRouteRemainLightCount(int routeRemainLightCount)
设置路径剩余红绿灯数量
Set number of remaining traffic lights on the route
参数:
routeRemainLightCount -
getNotAvoidInfo
public AMapNotAvoidInfo getNotAvoidInfo()
获取未避开的禁行、限行信息
Get unavioded prohibition and restriction information
返回:
getToViaInfo
public AMapNaviToViaInfo[] getToViaInfo()
获取当前位置到剩余途经点的信息
Get information from current position to remaining waypoints
返回:
从以下版本开始:
7.8.0