com.amap.api.trace

## 类 LBSTraceClient

- java.lang.Object
- - com.amap.api.trace.LBSTraceClient

-     public class LBSTraceClient
      extends java.lang.Object

  轨迹纠偏类，对行车GPS高精度定位轨迹集合纠偏
  Trajectory correction class, correcting the collection of high-precision GPS positioning trajectories for driving
  从以下版本开始:
    3.4.0

- - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `static java.lang.String` | `LOCATE_TIMEOUT_ERROR` 轨迹纠偏错误信息，定位超时 Trajectory correction error: positioning timeout
    `static java.lang.String` | `MIN_GRASP_POINT_ERROR` 轨迹纠偏错误信息，轨迹点太少或距离太近,轨迹纠偏失败 Trajectory correction error: too few trajectory points or too close distance, trajectory correction failed
    `static java.lang.String` | `TRACE_SUCCESS` 轨迹纠偏错误信息，纠偏运行正常 Trajectory correction error: correction running normally
    `static int` | `TYPE_AMAP` 用于`LBSTraceClient.queryProcessedTrace(int, List, int, TraceListener)` type 坐标系类型为高德 Used for `LBSTraceClient.queryProcessedTrace(int, List, int, TraceListener)` type coordinate system is AutoNavi
    `static int` | `TYPE_BAIDU` 用于`LBSTraceClient.queryProcessedTrace(int, List, int, TraceListener)` type 坐标系类型为百度 Used for `LBSTraceClient.queryProcessedTrace(int, List, int, TraceListener)` type coordinate system is Baidu
    `static int` | `TYPE_GPS` 用于`LBSTraceClient.queryProcessedTrace(int, List, int, TraceListener)` type 坐标系类型为GPS原始坐标 Used for `LBSTraceClient.queryProcessedTrace(int, List, int, TraceListener)` type coordinate system is raw GPS coordinates

  - ### 构造器概要

    构造器
    构造器和说明
    `LBSTraceClient(android.content.Context context)` 已过时。 使用 {`LBSTraceClient.getInstance(Context)`} Use {`LBSTraceClient.getInstance(Context)`}

  - ### 方法概要

    所有方法 静态方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `void` | `destroy()` 销毁LBSTraceClient Destroy LBSTraceClient
    `static LBSTraceClient` | `getInstance(android.content.Context context)` 获取LBSTraceClient Get LBSTraceClient
    `void` | `queryProcessedTrace(int lineID, java.util.List<TraceLocation> locations, int type, TraceListener listener)`
    `void` | `startTrace(TraceStatusListener traceStatusListener)` 开始记录轨迹，定位间隔2s，每隔5个点合并请求一次纠偏并回调。
    `void` | `stopTrace()` 停止记录轨迹 Stop recording trajectory

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

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

- - ### 字段详细资料

    - #### TYPE_AMAP

          public static final int TYPE_AMAP

      用于`LBSTraceClient.queryProcessedTrace(int, List, int, TraceListener)` type 坐标系类型为高德
      Used for `LBSTraceClient.queryProcessedTrace(int, List, int, TraceListener)` type coordinate system is AutoNavi
      从以下版本开始:
        3.4.0
      另请参阅:
        常量字段值

    - #### TYPE_GPS

          public static final int TYPE_GPS

      用于`LBSTraceClient.queryProcessedTrace(int, List, int, TraceListener)` type 坐标系类型为GPS原始坐标
      Used for `LBSTraceClient.queryProcessedTrace(int, List, int, TraceListener)` type coordinate system is raw GPS coordinates
      从以下版本开始:
        3.4.0
      另请参阅:
        常量字段值

    - #### TYPE_BAIDU

          public static final int TYPE_BAIDU

      用于`LBSTraceClient.queryProcessedTrace(int, List, int, TraceListener)` type 坐标系类型为百度
      Used for `LBSTraceClient.queryProcessedTrace(int, List, int, TraceListener)` type coordinate system is Baidu
      从以下版本开始:
        3.4.0
      另请参阅:
        常量字段值

    - #### MIN_GRASP_POINT_ERROR

          public static final java.lang.String MIN_GRASP_POINT_ERROR

      轨迹纠偏错误信息，轨迹点太少或距离太近,轨迹纠偏失败
      Trajectory correction error: too few trajectory points or too close distance, trajectory correction failed
      从以下版本开始:
        5.2.0

    - #### LOCATE_TIMEOUT_ERROR

          public static final java.lang.String LOCATE_TIMEOUT_ERROR

      轨迹纠偏错误信息，定位超时
      Trajectory correction error: positioning timeout
      从以下版本开始:
        5.2.0

    - #### TRACE_SUCCESS

          public static final java.lang.String TRACE_SUCCESS

      轨迹纠偏错误信息，纠偏运行正常
      Trajectory correction error: correction running normally
      从以下版本开始:
        5.2.0

  - ### 构造器详细资料

    - #### LBSTraceClient

          public LBSTraceClient(android.content.Context context)
                         throws java.lang.Exception

      已过时。 使用 {`LBSTraceClient.getInstance(Context)`}
      Use {`LBSTraceClient.getInstance(Context)`}
      轨迹纠偏构造函数
      Trajectory correction constructor
      参数:
        `context` - context对象，不能为空。
        Context object, cannot be null.
      抛出:
        `java.lang.Exception`
      从以下版本开始:
        3.4.0

  - ### 方法详细资料

    - #### getInstance

          public static LBSTraceClient getInstance(android.content.Context context)
                                            throws java.lang.Exception

      获取LBSTraceClient
      Get LBSTraceClient
      参数:
        `context` - context对象，不能为空。
        Context object, cannot be null.
      返回:
        返回LBSTraceClient对象
        Return LBSTraceClient object
      抛出:
        `java.lang.Exception`
      从以下版本开始:
        4.1.3

    - #### queryProcessedTrace

          public void queryProcessedTrace(int lineID,
                                          java.util.List<TraceLocation> locations,
                                          int type,
                                          TraceListener listener)

      参数:
        `lineID` - 用于标示一条轨迹，支持多轨迹纠偏，如果多条轨迹调起纠偏接口，则lineID需不同
        Used to mark a trajectory, supports multi-trajectory correction. If multiple trajectories trigger the correction interface, the lineID must be different
        `locations` - 一条轨迹的点集合，目前支持该点集合为一条行车GPS高精度定位轨迹
        A collection of points for a trajectory, currently supports this collection as a high-precision GPS positioning trajectory for driving
        `type` - 轨迹坐标系，目前支持高德 `LBSTraceClient.TYPE_AMAP`;GPS `LBSTraceClient.TYPE_GPS`TYPE_GPS;百度 `LBSTraceClient.TYPE_BAIDU`
        Trajectory coordinate system, currently supports AutoNavi `LBSTraceClient.TYPE_AMAP`; GPS `LBSTraceClient.TYPE_GPS`TYPE_GPS; Baidu `LBSTraceClient.TYPE_BAIDU`
        `listener` - 轨迹纠偏回调
        Trajectory correction callback
      从以下版本开始:
        3.4.0

    - #### startTrace

          public void startTrace(TraceStatusListener traceStatusListener)

      开始记录轨迹，定位间隔2s，每隔5个点合并请求一次纠偏并回调。
      Start recording trajectory, positioning interval 2s, merge a correction request and callback every 5 points.
      参数:
        `traceStatusListener` - 回调监听
        Callback listener
      从以下版本开始:
        5.2.0

    - #### stopTrace

          public void stopTrace()

      停止记录轨迹
      Stop recording trajectory
      从以下版本开始:
        5.2.0

    - #### destroy

          public void destroy()

      销毁LBSTraceClient
      Destroy LBSTraceClient
      从以下版本开始:
        5.0.0