|
||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||
java.lang.Objectcom.tencent.map.geolocation.TencentLocationUtils
public class TencentLocationUtils
工具类.
| 方法摘要 | |
|---|---|
static boolean |
contains(TencentLocation center,
double radius,
TencentLocation aPoint)
判断一片圆形区域是否包含指定的坐标点. |
static double |
distanceBetween(double aLatitude,
double aLongitude,
double bLatitude,
double bLongitude)
返回两个位置之间的距离, 位置分别为 (aLatitude, aLatitude) 和 (bLatitude, bLongitude). |
static double |
distanceBetween(TencentLocation aLoc,
TencentLocation bLoc)
返回两个位置之间的距离. |
static boolean |
isFromGps(TencentLocation location)
判断是否 GPS 定位. |
static boolean |
isFromNetwork(TencentLocation location)
判断是否 网络 定位. |
static boolean |
isSupportGps(Context context)
判断设备是否有GPS模块可支持GPS定位 |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 方法详细信息 |
|---|
public static double distanceBetween(TencentLocation aLoc,
TencentLocation bLoc)
aLoc - 一个位置bLoc - 另一个位置
java.lang.NullPointerException - 任一参数为 null
public static double distanceBetween(double aLatitude,
double aLongitude,
double bLatitude,
double bLongitude)
aLatitude - 第一个位置的纬度aLongitude - 第一个位置的经度bLatitude - 第二个位置的纬度bLongitude - 第二个位置的经度
public static boolean contains(TencentLocation center,
double radius,
TencentLocation aPoint)
center - 区域的中心点radius - 区域的半径, 单位 m(米)aPoint - 待判断的位置
public static boolean isFromGps(TencentLocation location)
public static boolean isFromNetwork(TencentLocation location)
public static boolean isSupportGps(Context context)
|
||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||