public static class TencentGeofence.Builder
extends java.lang.Object
构造器和说明 |
---|
Builder() |
限定符和类型 | 方法和说明 |
---|---|
TencentGeofence |
build()
根据已设置的参数生成新的 TencentGeofence 对象.
|
TencentGeofence.Builder |
setCircularRegion(double latitude,
double longitude,
float radius)
设置围栏经纬度(GCJ-02坐标)和半径.
|
TencentGeofence.Builder |
setExpirationDuration(long durationMillis)
设置围栏有效时间.
|
TencentGeofence.Builder |
setTag(java.lang.String tag)
设置围栏标识, 标识不为空且应当唯一.
|
public TencentGeofence.Builder setCircularRegion(double latitude, double longitude, float radius)
latitude
- 纬度longitude
- 经度radius
- 半径, 单位为 m(米)public TencentGeofence.Builder setExpirationDuration(long durationMillis)
durationMillis
- 单位为 ms(毫秒)public TencentGeofence.Builder setTag(java.lang.String tag)
java.lang.NullPointerException
- tag 为 "" 或 nullpublic TencentGeofence build()