public class NaviInfo
extends java.lang.Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected int |
currentSpeed
当前车速
Current vehicle speed |
protected int |
mCurLinkIndex
当前自车所在Link,从0开始
Current vehicle Link index, starting from 0 |
protected int |
mCurPointIndex
当前位置的前一个形状点号,从0开始
Previous shape point index of the current position, starting from 0 |
protected java.lang.String |
mCurRoadName
当前道路名称
Current road name |
protected int |
mCurSegIndex
当前自车所在segment段,从0开始
Current vehicle segment index, starting from 0 |
protected AMapExitDirectionInfo |
mExitDirectionInfo
出口方向信息
Exit direction information |
protected int |
mIcon
导航段转向图标
Navigation segment turn icon |
protected int |
mLinkRemainDis
当前导航Link剩余距离(单位米)
"Current navigation link remaining distance (unit: meters)." |
protected java.lang.String |
mNextRoadName
下条道路名称
Next road name |
protected int |
mRouteRemainDis
路径剩余距离(单位米)
Remaining distance of the route (unit: meter) |
protected int |
mRouteRemainTime
路径剩余时间(单位秒)
Remaining time of the route (unit: second) |
protected int |
mSegRemainDis
当前导航段剩余距离(单位米)
Remaining distance of the current navigation segment (unit: meter) |
protected int |
mSegRemainTime
当前导航段剩余时间(单位秒)
Remaining time of the current navigation segment (unit: second) |
protected int |
mType
导航类型
Navigation type. |
protected AMapNotAvoidInfo |
notAvoidInfo
限制、禁止图标信息
Restriction and prohibition icon information |
protected long |
pathID
线路ID
Route ID |
protected int |
routeRemainLightCount
路径剩余红绿灯数量
Number of remaining traffic lights on the route |
| 构造器和说明 |
|---|
NaviInfo() |
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getCurLink()
获取自车所在小路段索引
Get current minor segment index of the vehicle |
int |
getCurLinkRetainDistance()
获取当前Link段剩余距离
Get the remaining distance of the current link segment 注意:该接口仅驾车模式有效 note:This interface is only valid for driving mode |
int |
getCurPoint()
获取当前位置所在link上的点索引
Get point index on the link where the current position is located |
java.lang.String |
getCurrentRoadName()
获取当前路线名称
Get current route name |
int |
getCurrentSpeed()
已过时。
请从定位回调
AMapNaviListener.onLocationChange(AMapNaviLocation) 中获取当前车速Please get current vehicle speed from location callback AMapNaviListener.onLocationChange(AMapNaviLocation) |
int |
getCurStep()
获取当前大路段索引
Get current major segment index |
int |
getCurStepRetainDistance()
获取当前路段剩余距离
Get remaining distance of the current segment. |
int |
getCurStepRetainTime()
获取当前路段剩余时间
Get remaining time of the current segment. |
AMapExitDirectionInfo |
getExitDirectionInfo()
获取出口方向信息
Get exit direction information |
Bitmap |
getIconBitmap()
获取转向图标bitmap
Get turn icon bitmap. |
int |
getIconType()
获取导航转向图标类型
Get navigation turn icon type. |
int |
getNaviType()
导航信息类型
Navigation information type |
java.lang.String |
getNextRoadName()
获取下条路名
Get next road name |
AMapNotAvoidInfo |
getNotAvoidInfo()
获取未避开的禁行、限行信息
Get unavioded prohibition and restriction information |
long |
getPathId()
获取线路ID
Get route ID 注意:该接口仅驾车模式有效 Note: This interface is only valid for driving mode |
int |
getPathRetainDistance()
获取路线剩余距离
Get remaining distance of the route. |
int |
getPathRetainTime()
获取路线剩余时间(单位秒)
Get remaining time of the route (unit: second) |
int |
getRouteRemainLightCount()
获取路径剩余红绿灯数量
Get number of remaining traffic lights on the route. |
AMapNaviToViaInfo[] |
getToViaInfo()
获取当前位置到剩余途经点的信息
Get information from current position to remaining waypoints |
void |
setCurLink(int curLink)
设置自车所在小路段
Set current minor segment of the vehicle |
void |
setCurLinkRetainDistance(int curLinkRetainDistance)
设置当前Link段剩余距离(单位米)
"Set the remaining distance of the current link segment (unit: meters)." |
void |
setCurPoint(int curPoint)
设置当前位置所在link上的点索引
Set point index on the link where the current position is located |
void |
setCurrentRoadName(java.lang.String currentRoadName)
设置当前路名
Set current road name |
void |
setCurrentSpeed(int currentSpeed)
已过时。
|
void |
setCurStep(int curStep)
设置当前大路段索引
Set current major segment index |
void |
setCurStepRetainDistance(int curStepRetainDistance)
设置路段剩余距离(单位米)
Set remaining distance of the segment (unit: meter) |
void |
setCurStepRetainTime(int curStepRetainTime)
设置当前路段剩余时间(单位秒)
Set remaining time of the current segment (unit: second) |
void |
setExitDirectionInfo(AMapExitDirectionInfo aMapExitDirectionInfo)
设置出口方向信息
Set exit direction information |
void |
setIconBitmap(Bitmap iconBitmap)
设置转向图标
Set turn icon |
void |
setIconType(int iconType)
设置导航转向图标
Set navigation turn icon |
void |
setNaviType(int naviType)
设置导航信息类型
Set navigation information type |
void |
setNextRoadName(java.lang.String nextRoadName)
设置下条路名
Set next road name |
void |
setNotAvoidInfo(AMapNotAvoidInfo notAvoidInfo)
设置未避开的禁行、限行信息
Set unavioded prohibition and restriction information |
void |
setPathId(long pathId)
设置线路ID
Set route ID |
void |
setPathRetainDistance(int pathRetainDistance)
设置路线剩余距离(单位米)
Set remaining distance of the route (unit: meter) |
void |
setPathRetainTime(int pathRetainTime)
设置路线剩余时间(单位秒)
Set remaining time of the route (unit: second) |
void |
setRouteRemainLightCount(int routeRemainLightCount)
设置路径剩余红绿灯数量
Set number of remaining traffic lights on the route |
void |
setToViaInfo(AMapNaviToViaInfo[] toViaInfos) |
protected long pathID
protected int mType
1-实时导航 2-模拟导航
1-real-time navigation 2-simulated navigation
protected java.lang.String mCurRoadName
protected java.lang.String mNextRoadName
protected int mIcon
protected int mRouteRemainDis
protected int mRouteRemainTime
protected int mSegRemainDis
protected int mLinkRemainDis
protected int mSegRemainTime
protected int mCurSegIndex
protected int mCurLinkIndex
protected int mCurPointIndex
protected int currentSpeed
protected AMapNotAvoidInfo notAvoidInfo
protected AMapExitDirectionInfo mExitDirectionInfo
protected int routeRemainLightCount
public long getPathId()
注意:该接口仅驾车模式有效
Note: This interface is only valid for driving mode
public void setPathId(long pathId)
pathId - public AMapExitDirectionInfo getExitDirectionInfo()
AMapExitDirectionInfoAMapExitDirectionInfopublic void setExitDirectionInfo(AMapExitDirectionInfo aMapExitDirectionInfo)
aMapExitDirectionInfo - public int getCurrentSpeed()
AMapNaviListener.onLocationChange(AMapNaviLocation) 中获取当前车速AMapNaviListener.onLocationChange(AMapNaviLocation)public void setCurrentSpeed(int currentSpeed)
public int getNaviType()
public void setNaviType(int naviType)
naviType - 1-实时导航 2-模拟导航public java.lang.String getCurrentRoadName()
public void setCurrentRoadName(java.lang.String currentRoadName)
currentRoadName - public java.lang.String getNextRoadName()
public void setNextRoadName(java.lang.String nextRoadName)
nextRoadName - public int getIconType()
注意,当 getIconBitmap() 有返回值的时候,请优先使用其返回的Bitmap来绘制转向图标,这样结果更加准确。
Note, when getIconBitmap() has a return value, please use the returned Bitmap to draw the turn icon first, so the result will be more accurate.
public void setIconType(int iconType)
public int getPathRetainDistance()
注意:该接口仅驾车模式有效
Note: This interface is only valid for driving mode
public void setPathRetainDistance(int pathRetainDistance)
pathRetainDistance - public int getPathRetainTime()
public void setPathRetainTime(int pathRetainTime)
pathRetainTime - public int getCurStepRetainDistance()
注意:该接口仅驾车模式有效
Note: This interface is only valid for driving mode
public void setCurStepRetainDistance(int curStepRetainDistance)
curStepRetainDistance - public int getCurLinkRetainDistance()
public void setCurLinkRetainDistance(int curLinkRetainDistance)
curLinkRetainDistance - public int getCurStepRetainTime()
注意:该接口仅驾车模式有效
Note: This interface is only valid for driving mode
public void setCurStepRetainTime(int curStepRetainTime)
curStepRetainTime - public int getCurStep()
public void setCurStep(int curStep)
curStep - public int getCurLink()
public void setCurLink(int curLink)
curLink - public int getCurPoint()
public void setCurPoint(int curPoint)
curPoint - public Bitmap getIconBitmap()
此接口可能返回为空,返回空的情况下,请使用 getIconType() 来判别转向类型。请优先使用此接口来绘制转向图标。
This interface may return null. In case of null return, please use getIconType() to determine the turn type. Please use this interface first to draw the turn icon.
public void setIconBitmap(Bitmap iconBitmap)
iconBitmap - public int getRouteRemainLightCount()
注意:该接口仅驾车模式有效
Note: This interface is only valid for driving mode
public void setRouteRemainLightCount(int routeRemainLightCount)
routeRemainLightCount - public AMapNotAvoidInfo getNotAvoidInfo()
public void setNotAvoidInfo(AMapNotAvoidInfo notAvoidInfo)
notAvoidInfo - public AMapNaviToViaInfo[] getToViaInfo()
public void setToViaInfo(AMapNaviToViaInfo[] toViaInfos)