- Direct Known Subclasses:
FeatureFenceParameters,GraphicFenceParameters,GraphicsOverlayFenceParameters
FenceGeotrigger.
The FenceParameters defines all of the target geometries of a FenceGeotrigger.
Typically, it is made up of many polygons that objects from the GeotriggerFeed can enter
or exit. However, if you set a getBufferDistance(), 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
Modifier and TypeMethodDescriptionstatic FenceParameterscreateFromGeoElement(GeoElement geoElement, double bufferDistance) Static factory function to create a FenceParameters.doubleGets a buffer distance in meters to apply when checking if aFenceGeotriggercondition is met.
-
Method Details
-
getBufferDistance
public double getBufferDistance()Gets a buffer distance in meters to apply when checking if aFenceGeotriggercondition is met.For example, if the rule is "enters within 50 meters" you use a
FenceGeotrigger.getRuleType()ofFenceRuleType.ENTERand set this property to 50.Buffers are Geodetic and created using the following default values:
-
GeodeticCurveType.SHAPE_PRESERVING - Max deviation = NaN
-
LinearUnitId.METERS.
Geometrythen you must set this property to a value greater than 0.- Returns:
- a buffer distance in meters to apply when checking if a
FenceGeotriggercondition is met - Since:
- 100.12.0
-
-
createFromGeoElement
Static factory function to create a FenceParameters.This method creates the appropriate type of
FenceParametersbased on the type of theGeoElementthat was supplied. The supported types ofGeoElementareGraphicandFeature. If passed an unsupportedGeoElement, this method will return null.- Parameters:
geoElement- an individualGeoElementused to create aFenceParametersobjectbufferDistance- a buffer distance in meters to apply to theGeoElementwhen checking if aGeotriggercondition is met- Returns:
- a FenceParameters created from a
GeoElement - Throws:
IllegalArgumentException- if geoElement is null- Since:
- 100.12.0
-