com.amap.api.navi.model

## 类 AMapNaviPath

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

-     public class AMapNaviPath
      extends java.lang.Object

  导航路线描述信息类
  Navigation route description information class.

- - ### 构造器概要

    构造器
    构造器和说明
    `AMapNaviPath()`

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `java.util.List<AMapNaviCameraInfo>` | `getAllCameras()` 获取全路段的所有摄像头 Get all cameras on the entire route.
    `int` | `getAllLength()` 返回当前导航路线的总长度 Return the total length of the current navigation route.
    `int` | `getAllTime()` 返回当前导航路径所需的时间，单位为秒 Return the time required for the current navigation path, in seconds.
    `com.amap.api.maps.model.LatLngBounds` | `getBoundsForPath()` 获取该导航路线最小坐标点和最大坐标点围成的矩形区域 Get the rectangular area formed by the minimum and maximum coordinate points of the navigation route.
    `NaviLatLng` | `getCenterForPath()` 返回当前导航路线的中心点 Return the center point of the current navigation route.
    `int[]` | `getCityAdcodeList()` 获取驾车导航路线上沿途城市adcode列表 Get the list of city adcodes along the driving navigation route.
    `java.util.List<NaviLatLng>` | `getCoordList()` 返回当前导航路线的所有坐标点 Return all coordinate points of the current navigation route.
    `NaviLatLng` | `getEndPoint()` 获取当前路线方案的搜索终点（中心点）坐标 Get the search end point (center point) coordinates of the current route plan.
    `java.util.List<AMapNaviForbiddenInfo>` | `getForbiddenInfos()` 获取货车导航的禁止信息列表 Get the list of prohibition information for truck navigation.
    `java.lang.String` | `getLabels()` 获取当前路线的策略标签,如:距离最短，费用最少 Get the strategy label of the current route, such as: shortest distance, lowest cost.
    `java.util.List<NaviLatLng>` | `getLightList()` 获取道路上的红绿灯列表 Get the list of traffic lights on the road
    `java.util.List<AMapNaviLimitInfo>` | `getLimitInfos()` 获取货车导航的限制信息列表 Get the list of restriction information for truck navigation.
    `java.lang.String` | `getMainRoadInfo()` 获取主道路信息 Get main road information.
    `java.util.List<AMapNaviRouteGuideGroup>` | `getNaviGuideList()` 获取路线详情 Get route details
    `long` | `getPathid()` 获取路线id Get route ID
    `AMapRestrictionInfo` | `getRestrictionInfo()` 获取当前导航路线的限行信息 Get the restriction information of the current navigation route.
    `int` | `getRouteType()` 获取路线交通类型 Get route traffic type
    `NaviLatLng` | `getStartPoint()` 获取当前路线方案的搜索起点坐标 Get the search start point coordinates of the current route plan.
    `java.util.List<AMapNaviStep>` | `getSteps()` 返回当前导航路线上的分段列表 Return the list of segments on the current navigation route
    `int` | `getStepsCount()` 返回当前导航路线上分段的总数 Return the total number of segments on the current navigation route.
    `int` | `getTollCost()` 获取导航段的花费金额，单位元 Get the cost of the navigation segment, in yuan.
    `java.util.List<AMapTrafficIncidentInfo>` | `getTrafficIncidentInfo()` 获取路径交通事件信息 Get path traffic incident information.
    `int` | `getTrafficLightCount()` 获取红绿灯总数 Get the total number of traffic lights
    `java.util.List<AMapTrafficStatus>` | `getTrafficStatuses()` 获取当前路线的交通状态 Get the traffic status of the current route.
    `java.util.List<NaviLatLng>` | `getWayPoint()` 获取当前路径的途经点坐标 Get the coordinates of waypoints on the current path.
    `int[]` | `getWayPointIndex()` 获取途经点在路线点集中的索引 Get the index of waypoints in the route point set.
    `boolean` | `isMpidRestoreRoute()` 获取是否mpid还原出的路线 "Get whether the route is restored from mpid."

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

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

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

    - #### AMapNaviPath

          public AMapNaviPath()

  - ### 方法详细资料

    - #### isMpidRestoreRoute

          public boolean isMpidRestoreRoute()

      获取是否mpid还原出的路线
      "Get whether the route is restored from mpid."
      从以下版本开始:
        10.3.0

    - #### getPathid

          public long getPathid()

      获取路线id
      Get route ID
      返回:
      从以下版本开始:
        6.3.0

    - #### getMainRoadInfo

          public java.lang.String getMainRoadInfo()

      获取主道路信息
      Get main road information.

      注意：该接口仅驾车模式有效
      Note: This interface is only valid in driving mode

      返回:

    - #### getAllCameras

          public java.util.List<AMapNaviCameraInfo> getAllCameras()

      获取全路段的所有摄像头
      Get all cameras on the entire route.

      注意：该接口仅驾车模式有效
      Note: This interface is only valid in driving mode

      返回:
      从以下版本开始:
        5.0.0

    - #### getWayPointIndex

          public int[] getWayPointIndex()

      获取途经点在路线点集中的索引
      Get the index of waypoints in the route point set.

      注意：该接口仅驾车模式有效
      Note: This interface is only valid in driving mode

      返回:
        途经点索引数组
        Waypoint index array

    - #### getWayPoint

          public java.util.List<NaviLatLng> getWayPoint()

      获取当前路径的途经点坐标
      Get the coordinates of waypoints on the current path.

      注意：该接口仅驾车模式有效
      Note: This interface is only valid in driving mode

      返回:
        返回途经点坐标。
        Return waypoint coordinates.

    - #### getStartPoint

          public NaviLatLng getStartPoint()

      获取当前路线方案的搜索起点坐标
      Get the search start point coordinates of the current route plan.
      返回:
        返回起点坐标。
        Return start point coordinates.

    - #### getEndPoint

          public NaviLatLng getEndPoint()

      获取当前路线方案的搜索终点（中心点）坐标
      Get the search end point (center point) coordinates of the current route plan.
      返回:
        返回终点坐标。
        Return end point coordinates.

    - #### getCenterForPath

          public NaviLatLng getCenterForPath()

      返回当前导航路线的中心点
      Return the center point of the current navigation route.
      返回:
        返回当前导航路线的中心点，即导航路径的最小外接矩形对角线的交点。
        Return the center point of the current navigation route, which is the intersection of the diagonal of the minimum bounding rectangle of the navigation path.

    - #### getBoundsForPath

          public com.amap.api.maps.model.LatLngBounds getBoundsForPath()

      获取该导航路线最小坐标点和最大坐标点围成的矩形区域
      Get the rectangular area formed by the minimum and maximum coordinate points of the navigation route.

      该方法需要在地图载入成功后使用。返回的LatLngBounds用法见地图包。
      This method needs to be used after the map is loaded successfully. See the map package for the usage of the returned LatLngBounds.

      返回:
        获取的一个矩形区域。LatLngBounds的用法参见地图包，可以获取矩形左下和右上点的坐标。
        Get a rectangular area. See the map package for the usage of LatLngBounds, which can obtain the coordinates of the lower left and upper right points of the rectangle.

    - #### getSteps

          public java.util.List<AMapNaviStep> getSteps()

      返回当前导航路线上的分段列表
      Return the list of segments on the current navigation route
      返回:
        返回路线分段 `AMapNaviStep` 的列表
        Return the list of route segments `AMapNaviStep`

    - #### getCoordList

          public java.util.List<NaviLatLng> getCoordList()

      返回当前导航路线的所有坐标点
      Return all coordinate points of the current navigation route.
      返回:
        返回当前导航路线的所有坐标点。
        Return all coordinate points of the current navigation route.

    - #### getAllLength

          public int getAllLength()

      返回当前导航路线的总长度
      Return the total length of the current navigation route.
      返回:
        返回当前导航方案的总长度。如果获取成功则返回路径长度，单位为米，否则返回-1。
        Return the total length of the current navigation plan. If successful, return the path length in meters, otherwise return -1.

    - #### getAllTime

          public int getAllTime()

      返回当前导航路径所需的时间，单位为秒
      Return the time required for the current navigation path, in seconds.
      返回:
        如果获取成功则返回当前导航路径所需时间，单位为秒；否则返回-1。
        If successful, return the time required for the current navigation path in seconds; otherwise return -1.

    - #### getStepsCount

          public int getStepsCount()

      返回当前导航路线上分段的总数
      Return the total number of segments on the current navigation route.
      返回:
        返回当前导航路线上分段的总数。
        Return the total number of segments on the current navigation route.

    - #### getTollCost

          public int getTollCost()

      获取导航段的花费金额，单位元
      Get the cost of the navigation segment, in yuan.

      注意：该接口仅驾车模式有效
      Note: This interface is only valid in driving mode

      返回:
        获取导航段的花费金额，单位元。
        Get the cost of the navigation segment, in yuan.

    - #### getTrafficStatuses

          public java.util.List<AMapTrafficStatus> getTrafficStatuses()

      获取当前路线的交通状态
      Get the traffic status of the current route.

      注意：该接口仅驾车模式有效
      Note: This interface is only valid in driving mode

      返回:
        交通状态对象集合
        Traffic status object collection

    - #### getLabels

          public java.lang.String getLabels()

      获取当前路线的策略标签,如:距离最短，费用最少
      Get the strategy label of the current route, such as: shortest distance, lowest cost.

      注意：该接口仅驾车模式有效
      Note: This interface is only valid in driving mode

      返回:
        策略标签
        Strategy label

    - #### getRestrictionInfo

          public AMapRestrictionInfo getRestrictionInfo()

      获取当前导航路线的限行信息
      Get the restriction information of the current navigation route.

      注意：该接口仅驾车模式有效
      Note: This interface is only valid in driving mode

      返回:
        restrionInfo

    - #### getCityAdcodeList

          public int[] getCityAdcodeList()

      获取驾车导航路线上沿途城市adcode列表
      Get the list of city adcodes along the driving navigation route.

      注意：该接口仅驾车模式有效
      Note: This interface is only valid in driving mode

      返回:
        adcode数组
        adcode array

    - #### getLightList

          public java.util.List<NaviLatLng> getLightList()

      获取道路上的红绿灯列表
      Get the list of traffic lights on the road
      返回:
        返回当前路线上的红绿灯
        Return traffic lights on the current route
      从以下版本开始:
        5.4.0

    - #### getLimitInfos

          public java.util.List<AMapNaviLimitInfo> getLimitInfos()

      获取货车导航的限制信息列表
      Get the list of restriction information for truck navigation.

      注意：该接口仅货车模式有效
      Note: This interface is only valid in truck mode

      返回:
        返回货车导航的限制信息列表
        Return the list of restriction information for truck navigation
      从以下版本开始:
        6.0.0

    - #### getForbiddenInfos

          public java.util.List<AMapNaviForbiddenInfo> getForbiddenInfos()

      获取货车导航的禁止信息列表
      Get the list of prohibition information for truck navigation.

      注意：该接口仅货车模式有效
      Note: This interface is only valid in truck mode

      返回:
        返回货车导航的禁止信息列表
        Return the list of prohibition information for truck navigation
      从以下版本开始:
        6.0.0

    - #### getTrafficIncidentInfo

          public java.util.List<AMapTrafficIncidentInfo> getTrafficIncidentInfo()

      获取路径交通事件信息
      Get path traffic incident information.

      注意：该接口仅货车模式有效
      Note: This interface is only valid in truck mode

      返回:
      从以下版本开始:
        7.1.0

    - #### getTrafficLightCount

          public int getTrafficLightCount()

      获取红绿灯总数
      Get the total number of traffic lights
      返回:
      从以下版本开始:
        7.5.0

    - #### getNaviGuideList

          public java.util.List<AMapNaviRouteGuideGroup> getNaviGuideList()

      获取路线详情
      Get route details
      返回:
      从以下版本开始:
        7.5.0

    - #### getRouteType

          public int getRouteType()

      获取路线交通类型
      Get route traffic type
      返回:
        1-驾车 2-骑行（自行车）3-步行 4-骑行（电动车）
        1-driving 2-cycling (bicycle) 3-walking 4-cycling (electric bike)
      从以下版本开始:
        7.5.0