Class FenceParameters
- java.lang.Object
-
- com.esri.arcgisruntime.geotriggers.FenceParameters
-
- Direct Known Subclasses:
FeatureFenceParameters
,GraphicFenceParameters
,GraphicsOverlayFenceParameters
public abstract class FenceParameters extends Object
Geotrigger fence data required for aFenceGeotrigger
.The FenceParameters defines all of the target geometries of a
FenceGeotrigger
. Typically, it is made up of many polygons that objects from theGeotriggerFeed
can enter or exit. However, if you set agetBufferDistance()
, point and line geometry can also be used. For example, if the condition is "notify me when my position comes within 50 meters of one of my target areas", the fence data would be "my target areas".Fence data can be created as one of:
- Since:
- 100.12.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FenceParameters
createFromGeoElement(GeoElement geoElement, double bufferDistance)
Static factory function to create a FenceParameters.double
getBufferDistance()
Gets a buffer distance in meters to apply when checking if aFenceGeotrigger
condition is met.
-
-
-
Method Detail
-
getBufferDistance
public double getBufferDistance()
Gets a buffer distance in meters to apply when checking if aFenceGeotrigger
condition is met.For example, if the rule is "enters within 50 meters" you use a
FenceGeotrigger.getRuleType()
ofFenceRuleType.ENTER
and set this property to 50.Buffers are Geodetic and created using the following default values:
-
GeodeticCurveType.SHAPE_PRESERVING
- Max deviation = NaN
-
LinearUnitId.METERS
.
Geometry
then you must set this property to a value greater than 0.- Returns:
- a buffer distance in meters to apply when checking if a
FenceGeotrigger
condition is met - Since:
- 100.12.0
-
-
createFromGeoElement
public static FenceParameters createFromGeoElement(GeoElement geoElement, double bufferDistance)
Static factory function to create a FenceParameters.This method creates the appropriate type of
FenceParameters
based on the type of theGeoElement
that was supplied. The supported types ofGeoElement
areGraphic
andFeature
. If passed an unsupportedGeoElement
, this method will return null.- Parameters:
geoElement
- an individualGeoElement
used to create aFenceParameters
objectbufferDistance
- a buffer distance in meters to apply to theGeoElement
when checking if aGeotrigger
condition is met- Returns:
- a FenceParameters created from a
GeoElement
- Throws:
IllegalArgumentException
- if geoElement is null- Since:
- 100.12.0
-
-