public class GeoFence
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
GeoFence.MonitoredTypes
Enumerate supported categories for monitored map items
Only CoT atoms (a-*) are currently supported
|
static class |
GeoFence.Trigger
Enumerate trigger types
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_ENTRY_RADIUS_KM |
static int |
MAX_ELEVATION |
static int |
MAX_ENTRY_RADIUS_KM |
static int |
MIN_ELEVATION |
Constructor and Description |
---|
GeoFence(MapItem mapItem,
boolean tracking,
GeoFence.Trigger trigger,
GeoFence.MonitoredTypes monitoredTypes,
int rangeKM)
ctor
creates fence based on height of the provided shape
|
GeoFence(MapItem mapItem,
boolean tracking,
GeoFence.Trigger trigger,
GeoFence.MonitoredTypes monitoredTypes,
int rangeKM,
double minElevation,
double maxElevation) |
GeoFence(MapItem mapItem,
int rangeKM) |
Modifier and Type | Method and Description |
---|---|
static void |
clearGeofenceState(MapView mapView,
MapItem mapItem)
Unsets all of the map item variables in order to correctly remove the geofence.
|
boolean |
equals(java.lang.Object o) |
static GeoFence |
fromCot(CotEvent from)
Deprecated.
|
static GeoFence |
fromMapItem(MapItem mapItem)
Create A GeoFence from the mapItem
|
java.lang.String |
getMapItemUid() |
double |
getMaxElevation() |
double |
getMinElevation() |
GeoFence.MonitoredTypes |
getMonitoredTypes() |
int |
getRangeKM()
Number of KM to monitor (radius from shape center point)
for TriggerTypes.Entry.
|
GeoFence.Trigger |
getTrigger() |
int |
hashCode() |
boolean |
isElevationMonitored() |
boolean |
isTracking() |
boolean |
isValid() |
void |
setElevationRange(double minAlt,
double maxAlt) |
void |
setMonitoredTypes(GeoFence.MonitoredTypes _monitoredTypes) |
void |
setRangeKM(int rangeKM)
Set the maximum range for consideration of any of the tests (enter or exit)
|
void |
setTracking(boolean tracking) |
void |
setTrigger(GeoFence.Trigger trigger) |
java.lang.String |
toString() |
public static final int DEFAULT_ENTRY_RADIUS_KM
public static final int MAX_ENTRY_RADIUS_KM
public static final int MIN_ELEVATION
public static final int MAX_ELEVATION
public GeoFence(MapItem mapItem, boolean tracking, GeoFence.Trigger trigger, GeoFence.MonitoredTypes monitoredTypes, int rangeKM)
mapItem
- the map item to fence ontracking
- if it is currently being consideredtrigger
- the trigger for the geofencemonitoredTypes
- the monitor typerangeKM
- (kilometers)public GeoFence(MapItem mapItem, int rangeKM)
public GeoFence(MapItem mapItem, boolean tracking, GeoFence.Trigger trigger, GeoFence.MonitoredTypes monitoredTypes, int rangeKM, double minElevation, double maxElevation)
public GeoFence.MonitoredTypes getMonitoredTypes()
public void setMonitoredTypes(GeoFence.MonitoredTypes _monitoredTypes)
public java.lang.String getMapItemUid()
public boolean isTracking()
public void setTracking(boolean tracking)
public boolean isElevationMonitored()
public GeoFence.Trigger getTrigger()
public void setTrigger(GeoFence.Trigger trigger)
public int getRangeKM()
public void setRangeKM(int rangeKM)
rangeKM
- the range in kilometerspublic double getMinElevation()
public double getMaxElevation()
public void setElevationRange(double minAlt, double maxAlt)
public boolean isValid()
public static void clearGeofenceState(MapView mapView, MapItem mapItem)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object