public class Region extends Signal
location, TYPE_BEACON, TYPE_GEOFENCE, TYPE_WIFIproperties| Constructor and Description |
|---|
Region(org.json.JSONObject info) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsLocation(android.location.Location location)
Determine if a Location is contained within the Region.
|
Region |
copy() |
double |
distanceFromLocation(android.location.Location location)
Compute the distance to this Region.
|
java.lang.Object |
get(java.lang.String key) |
android.location.Location |
getCenter()
Get the center point of the Region as an operating system Location object.
|
long |
getLastDetected()
Get the approximate range (in meters) to the center of the region
|
java.util.List<double[]> |
getPolyCoords() |
int |
getPolyCount()
For polygon regions, get then number of vertices in the polygon
|
double |
getRadius()
Get the radius of the region (meters).
|
double |
getRange()
Get the approximate range (in meters) to the center of the region
|
int |
getType()
Get the signal type -- always returns TYPE_GEOFENCE
|
boolean |
hasBeacons()
Determine if this Region contains beacons (control regions only)
|
void |
setLastDetected(long ts) |
java.lang.String |
toString() |
getAttachments, getAttributes, getError, getLabels, getLocation, getURN, setErrorpublic int getType()
public double getRange()
public long getLastDetected()
getLastDetected in class Signalpublic void setLastDetected(long ts)
public android.location.Location getCenter()
public double getRadius()
public int getPolyCount()
public java.util.List<double[]> getPolyCoords()
public double distanceFromLocation(android.location.Location location)
location - public boolean containsLocation(android.location.Location location)
location - public boolean hasBeacons()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object get(java.lang.String key)
public Region copy()