com.amap.api.navi.model

## 类 AMapNaviToViaInfo

- java.lang.Object
- - com.amap.api.navi.model.AMapNaviToViaInfo

-     public class AMapNaviToViaInfo
      extends java.lang.Object

  当前自车距离途经点的信息
  Information about the current vehicle's distance to waypoints
  从以下版本开始:
    7.8.0

- - ### 构造器概要

    构造器
    构造器和说明
    `AMapNaviToViaInfo(int index, ToViaInfo toViaInfo)`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `int` | `getDistance()` 获取自车到该途经点的剩余距离，单位：米 Get the remaining distance from the current vehicle to the waypoint, unit: meters
    `int` | `getTime()` 获取自车到该途经点的剩余时间，单位：秒 Get the remaining time from the current vehicle to the waypoint, unit: seconds
    `int` | `getTrafficlightNum()` 获取自车位置到前方第一个途径点的红绿灯数量 Get the number of traffic lights from the current vehicle position to the first waypoint ahead
    `int` | `getViaIndex()` 获取途经点的索引 Get the index of the waypoint
    `void` | `setDistance(int distance)` exclude
    `void` | `setTime(int time)` exclude
    `void` | `setViaIndex(int viaIndex)` exclude

    - ### 从类继承的方法 java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### AMapNaviToViaInfo

          public AMapNaviToViaInfo(int index,
                                   ToViaInfo toViaInfo)

  - ### 方法详细资料

    - #### getViaIndex

          public int getViaIndex()

      获取途经点的索引
      Get the index of the waypoint
      返回:

    - #### setViaIndex

          public void setViaIndex(int viaIndex)

      exclude

    - #### getDistance

          public int getDistance()

      获取自车到该途经点的剩余距离，单位：米
      Get the remaining distance from the current vehicle to the waypoint, unit: meters
      返回:

    - #### setDistance

          public void setDistance(int distance)

      exclude

    - #### getTime

          public int getTime()

      获取自车到该途经点的剩余时间，单位：秒
      Get the remaining time from the current vehicle to the waypoint, unit: seconds
      返回:

    - #### setTime

          public void setTime(int time)

      exclude

    - #### getTrafficlightNum

          public int getTrafficlightNum()

      获取自车位置到前方第一个途径点的红绿灯数量
      Get the number of traffic lights from the current vehicle position to the first waypoint ahead
      返回:
      从以下版本开始:
        9.5.0