com.amap.api.navi.view

## 类 RouteOverLay

- java.lang.Object
- - BaseRouteOverLay
  - - com.amap.api.navi.view.RouteOverLay

-     public class RouteOverLay
      extends BaseRouteOverLay

- - ### 构造器概要

    构造器
    构造器和说明
    `RouteOverLay(com.amap.api.maps.AMap amap, AMapNaviPath aMapNaviPath, Context context)` 根据给定的参数，构造一个导航路线图层类对象 Construct a navigation route overlay class object based on the given parameters.

  - ### 方法概要

    所有方法 实例方法 具体方法 已过时的方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `addToMap()` 添加驾车/步行/骑行路线到地图上显示 Add driving/walking/cycling routes to the map for display.
    `void` | `addToMap(com.amap.api.maps.model.BitmapDescriptor[] routeResource, int[] index)` 已过时。
    `void` | `addToMap(int[] color, int[] index)` 已过时。
    `void` | `destroy()` 释放路线资源 Release route resources
    `void` | `handleLimitAndForbiddenInfos()` 处理限行、禁行和封路的图标 Handle icons for traffic restrictions, prohibitions, and road closures
    `void` | `onArriveDestination()`
    `void` | `removeFromMap()` 移除RouteOverlay上绘制的路线 Remove the route drawn on RouteOverlay.
    `void` | `setArrowOnRoute(boolean visible)` 是否隐藏路线上三角纹理 Whether to hide the triangle texture on the route
    `void` | `setPassRouteVisible(boolean visible)`
    `void` | `setRouteOverlayOptions(RouteOverlayOptions routeOverlayOptions)` 设置路线的配置信息，如:路线的交通状态纹理图片 Set route configuration information, such as: traffic status texture images of the route.
    `void` | `setTransparency(float value)` 设置该routeOverlay的透明度 Set the transparency of this routeOverlay
    `void` | `setZindex(int num)` 设置当前路线的权重，如果路线有重合部分，那么权重高的路线将展现在上面 Set the weight of the current route, If the routes overlap, the route with higher weight will be displayed on top.
    `void` | `updatePolyline(AMapNaviLocation location)` 更新置灰路线 Update grayed route

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

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

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

    - #### RouteOverLay

          public RouteOverLay(com.amap.api.maps.AMap amap,
                              AMapNaviPath aMapNaviPath,
                              Context context)

      根据给定的参数，构造一个导航路线图层类对象
      Construct a navigation route overlay class object based on the given parameters.
      参数:
        `amap` - 地图对象。
        Map object.
        `aMapNaviPath` - 导航路线规划方案。
        Navigation route planning scheme.
        `context` - 当前的activity对象。
        Current activity object.

  - ### 方法详细资料

    - #### setRouteOverlayOptions

          public void setRouteOverlayOptions(RouteOverlayOptions routeOverlayOptions)

      设置路线的配置信息，如:路线的交通状态纹理图片
      Set route configuration information, such as: traffic status texture images of the route.
      参数:
        `routeOverlayOptions` - options

    - #### addToMap

          public void addToMap()

      添加驾车/步行/骑行路线到地图上显示
      Add driving/walking/cycling routes to the map for display.

    - #### removeFromMap

          public void removeFromMap()

      移除RouteOverlay上绘制的路线
      Remove the route drawn on RouteOverlay.

    - #### destroy

          public void destroy()

      释放路线资源
      Release route resources

    - #### setArrowOnRoute

          public void setArrowOnRoute(boolean visible)

      是否隐藏路线上三角纹理
      Whether to hide the triangle texture on the route
      参数:
        `visible` -
      从以下版本开始:
        6.2.0

    - #### addToMap

          public void addToMap(int[] color,
                               int[] index)

      已过时。
      将routeOverlay添加到地图上
      Add routeOverlay to the map
      参数:
        `color` - 用户自定义的各路段的颜色
        Colors of each segment customized by the user
        `index` - 用来间隔各路段的索引数组
        Index array used to separate each segment
      从以下版本开始:
        1.5.0

    - #### addToMap

          public void addToMap(com.amap.api.maps.model.BitmapDescriptor[] routeResource,
                               int[] index)

      已过时。
      将routeOverlay添加到地图上
      Add routeOverlay to the map
      参数:
        `routeResource` - 用户自定义的各路段的纹理资源
        Texture resources of each segment customized by the user
        `index` - 用来间隔各路段的索引数组
        Index array used to separate each segment
      从以下版本开始:
        1.5.0

    - #### setTransparency

          public void setTransparency(float value)

      设置该routeOverlay的透明度
      Set the transparency of this routeOverlay
      参数:
        `value` - 范围为[0,1]，设置1的时候为不透明，设置0的时候为完全透明，默认是1
        Range is [0,1]. When set to 1, it is opaque. When set to 0, it is completely transparent. Default is 1
      从以下版本开始:
        1.6.0

    - #### setZindex

          public void setZindex(int num)

      设置当前路线的权重，如果路线有重合部分，那么权重高的路线将展现在上面
      Set the weight of the current route, If the routes overlap, the route with higher weight will be displayed on top.
      参数:
        `num` - 权重值
        Weight value
      从以下版本开始:
        1.9.2

    - #### handleLimitAndForbiddenInfos

          public void handleLimitAndForbiddenInfos()

      处理限行、禁行和封路的图标
      Handle icons for traffic restrictions, prohibitions, and road closures

    - #### updatePolyline

          public void updatePolyline(AMapNaviLocation location)

      更新置灰路线
      Update grayed route
      参数:
        `location` - 车标当前位置信息
        Current position information of the vehicle marker

    - #### onArriveDestination

          public void onArriveDestination()

    - #### setPassRouteVisible

          public void setPassRouteVisible(boolean visible)