public class LBSTraceClient
extends java.lang.Object
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
LOCATE_TIMEOUT_ERROR
轨迹纠偏错误信息,定位超时
|
static java.lang.String |
MIN_GRASP_POINT_ERROR
轨迹纠偏错误信息,轨迹点太少或距离太近,轨迹纠偏失败
|
static java.lang.String |
TRACE_SUCCESS
轨迹纠偏错误信息,纠偏运行正常
|
static int |
TYPE_AMAP
|
static int |
TYPE_BAIDU
|
static int |
TYPE_GPS
用于
LBSTraceClient.queryProcessedTrace(int, List, int, TraceListener) type 坐标系类型为GPS原始坐标 |
构造器和说明 |
---|
LBSTraceClient(android.content.Context context)
已过时。
|
限定符和类型 | 方法和说明 |
---|---|
void |
destroy()
销毁LBSTraceClient
|
static LBSTraceClient |
getInstance(android.content.Context context)
获取LBSTraceClient
|
void |
queryProcessedTrace(int lineID,
java.util.List<TraceLocation> locations,
int type,
TraceListener listener) |
void |
startTrace(TraceStatusListener traceStatusListener)
开始记录轨迹,定位间隔2s,每隔5个点合并请求一次纠偏并回调。
|
void |
stopTrace()
停止记录轨迹
|
public static final int TYPE_AMAP
public static final int TYPE_GPS
LBSTraceClient.queryProcessedTrace(int, List, int, TraceListener)
type 坐标系类型为GPS原始坐标public static final int TYPE_BAIDU
public static final java.lang.String MIN_GRASP_POINT_ERROR
public static final java.lang.String LOCATE_TIMEOUT_ERROR
public static final java.lang.String TRACE_SUCCESS
public LBSTraceClient(android.content.Context context) throws java.lang.Exception
LBSTraceClient.getInstance(Context)
}context
- context对象,不能为空。java.lang.Exception
public static LBSTraceClient getInstance(android.content.Context context) throws java.lang.Exception
context
- context对象,不能为空。java.lang.Exception
public void queryProcessedTrace(int lineID, java.util.List<TraceLocation> locations, int type, TraceListener listener)
lineID
- 用于标示一条轨迹,支持多轨迹纠偏,如果多条轨迹调起纠偏接口,则lineID需不同locations
- 一条轨迹的点集合,目前支持该点集合为一条行车GPS高精度定位轨迹type
- 轨迹坐标系,目前支持高德 LBSTraceClient.TYPE_AMAP
;GPS
LBSTraceClient.TYPE_GPS
TYPE_GPS;百度 LBSTraceClient.TYPE_BAIDU
listener
- 轨迹纠偏回调public void startTrace(TraceStatusListener traceStatusListener)
traceStatusListener
- 回调监听public void stopTrace()
public void destroy()