public final class CustomLocationProvider
extends java.lang.Object
限定符和类型 | 类和说明 |
---|---|
static interface |
CustomLocationProvider.MyLocationSource |
限定符和类型 | 字段和说明 |
---|---|
static java.lang.String |
NAME |
限定符和类型 | 方法和说明 |
---|---|
void |
clearLocation()
清理定位点
|
static CustomLocationProvider |
getInstance() |
android.location.Location |
getLatestLocation()
获取当前最新的定位点
|
LocationSource |
getLocationSource()
获取定位源对象
|
boolean |
hasLocation()
判断当前是否有定位数据
|
boolean |
hasLocationSource()
判断当前是否有定位源
|
void |
requestLatestLocation()
请求最新定位点
|
void |
setMyLocationSource(CustomLocationProvider.MyLocationSource myLocationSource)
设置定位源
|
void |
setMyLocationSource(android.os.Handler requestHandler,
CustomLocationProvider.MyLocationSource myLocationSource)
设置定位源
|
public static final java.lang.String NAME
public static CustomLocationProvider getInstance()
public LocationSource getLocationSource()
public void setMyLocationSource(CustomLocationProvider.MyLocationSource myLocationSource)
myLocationSource
- 定位源对象public void setMyLocationSource(android.os.Handler requestHandler, CustomLocationProvider.MyLocationSource myLocationSource)
requestHandler
- 发起请求过程的线程myLocationSource
- 定位源对象public void requestLatestLocation()
public android.location.Location getLatestLocation()
public void clearLocation()
public boolean hasLocation()
public boolean hasLocationSource()