Class GraphicFenceParameters
The graphics used to create a GraphicFenceParameters provide a set of geometries and
attributes that define targets for a FenceGeotrigger
condition. For example, if the
condition is "notify me when my position comes within 50 meters of one of my target
areas", the fence data is "my target areas".
A GraphicFenceParameters allows you to track a specific set of Graphic
objects:
these can be a selection of the graphics from a GraphicsOverlay
or graphics that are not
displayed on a GeoView
. If you wish to track all of the graphics displayed in a
GraphicsOverlay
, use a GraphicsOverlayFenceParameters
.
A GraphicFenceParameters is created using a list of Graphic
objects. The graphics
can have point, line, or polygon geometry. A FenceParameters.getBufferDistance()
must be
supplied for points or lines.
- Since:
- 100.12.0
-
Constructor Summary
ConstructorDescriptionGraphicFenceParameters
(double bufferDistance) Creates a GraphicFenceParameters that will apply a buffer distance to any graphics that are added togetGraphics()
.GraphicFenceParameters
(Iterable<Graphic> graphics) Creates a GraphicFenceParameters that will apply a buffer distance to the supplied graphics.GraphicFenceParameters
(Iterable<Graphic> graphics, double bufferDistance) Creates a GraphicFenceParameters that will apply a buffer distance to any graphics that are added togetGraphics()
. -
Method Summary
Modifier and TypeMethodDescriptionGets the graphics to use in the GraphicFenceParameters.Methods inherited from class com.esri.arcgisruntime.geotriggers.FenceParameters
createFromGeoElement, getBufferDistance
-
Constructor Details
-
GraphicFenceParameters
Creates a GraphicFenceParameters that will apply a buffer distance to the supplied graphics.- Parameters:
graphics
- a set of graphics that should be used as fences- Throws:
IllegalArgumentException
- if graphics is null- Since:
- 100.12.0
-
GraphicFenceParameters
Creates a GraphicFenceParameters that will apply a buffer distance to any graphics that are added togetGraphics()
.- Parameters:
graphics
- a set of graphics that should be used as fencesbufferDistance
- a buffer distance in meters to apply to the graphics when checking if aGeotrigger
condition is met- Throws:
IllegalArgumentException
- if graphics is null- Since:
- 100.12.0
-
GraphicFenceParameters
public GraphicFenceParameters(double bufferDistance) Creates a GraphicFenceParameters that will apply a buffer distance to any graphics that are added togetGraphics()
.- Parameters:
bufferDistance
- a buffer distance in meters to apply to graphics when checking if aGeotrigger
condition is met- Since:
- 100.12.0
-
-
Method Details
-
getGraphics
Gets the graphics to use in the GraphicFenceParameters.This collection will be tracked when monitoring a
Geotrigger
such that any graphics that are added will be included and any that are removed will no longer be checked.The
Geometry
of eachGraphic
will be buffered by the buffer distance.- Returns:
- the graphics to use in the GraphicFenceParameters
- Since:
- 100.12.0
-