public final class

CustomLocationProvider

extends Object
java.lang.Object
   ↳ com.tencent.tencentmap.mapsdk.maps.CustomLocationProvider

Class Overview

自定义定位数据提供器

Summary

Nested Classes
interface CustomLocationProvider.MyLocationSource  
Constants
String NAME
Public Methods
synchronized void clearLocation()
清理定位点
static CustomLocationProvider getInstance()
synchronized Location getLatestLocation()
获取当前最新的定位点
LocationSource getLocationSource()
获取定位源对象
synchronized boolean hasLocation()
判断当前是否有定位数据
boolean hasLocationSource()
判断当前是否有定位源
void requestLatestLocation()
请求最新定位点
void setMyLocationSource(Handler requestHandler, CustomLocationProvider.MyLocationSource myLocationSource)
设置定位源
void setMyLocationSource(CustomLocationProvider.MyLocationSource myLocationSource)
设置定位源
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String NAME

Constant Value: "_CustomAutoLocationProvider"

Public Methods

public synchronized void clearLocation ()

清理定位点

public static CustomLocationProvider getInstance ()

public synchronized Location getLatestLocation ()

获取当前最新的定位点

Returns
  • 定位点

public LocationSource getLocationSource ()

获取定位源对象

Returns
  • 定位源对象

public synchronized boolean hasLocation ()

判断当前是否有定位数据

Returns
  • true-存在

public boolean hasLocationSource ()

判断当前是否有定位源

Returns
  • true-存在

public void requestLatestLocation ()

请求最新定位点

public void setMyLocationSource (Handler requestHandler, CustomLocationProvider.MyLocationSource myLocationSource)

设置定位源

Parameters
requestHandler 发起请求过程的线程
myLocationSource 定位源对象

public void setMyLocationSource (CustomLocationProvider.MyLocationSource myLocationSource)

设置定位源

Parameters
myLocationSource 定位源对象