com.tencent.map.geolocation
类 TencentGeofence

java.lang.Object
  继承者 com.tencent.map.geolocation.TencentGeofence

public class TencentGeofence
extends java.lang.Object

地理围栏.

地理围栏表示一片地理位置区域, 用户设备进入或退出该区域后会触发相应的地理围栏事件, 应用程序可捕获感兴趣的地理围栏事件并执行相应操作(比如通过声音或振动提示用户).

注意: 为简化地理围栏处理过程, 目前仅支持圆形地理围栏, 其参数包括:

从以下版本开始:
4.0
作者:
kingcmchen@tencent.com

嵌套类摘要
static class TencentGeofence.Builder
          用于生成 TencentGeofence 的 Builder.
 
方法摘要
 boolean equals(java.lang.Object obj)
           
 long getDuration()
          返回有效期, 单位为 ms(毫秒).
 long getExpireAt()
          返回过期时间, 过期时间 = 有效期 + SystemClock.elapsedRealtime()
 double getLatitude()
          返回纬度.
 double getLongitude()
          返回经度.
 float getRadius()
          返回半径, 单位为 m(米).
 java.lang.String getTag()
          返回唯一标识.
 int hashCode()
           
 java.lang.String toString()
           
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

方法详细信息

getLatitude

public double getLatitude()
返回纬度.


getLongitude

public double getLongitude()
返回经度.


getRadius

public float getRadius()
返回半径, 单位为 m(米).


getExpireAt

public long getExpireAt()
返回过期时间, 过期时间 = 有效期 + SystemClock.elapsedRealtime()

另请参见:
SystemClock#elapsedRealtime()

getDuration

public long getDuration()
返回有效期, 单位为 ms(毫秒).


getTag

public java.lang.String getTag()
返回唯一标识.


hashCode

public int hashCode()
覆盖:
java.lang.Object 中的 hashCode

equals

public boolean equals(java.lang.Object obj)
覆盖:
java.lang.Object 中的 equals

toString

public java.lang.String toString()
覆盖:
java.lang.Object 中的 toString