Class GraphicFenceParameters
- java.lang.Object
-
- com.esri.arcgisruntime.geotriggers.FenceParameters
-
- com.esri.arcgisruntime.geotriggers.GraphicFenceParameters
-
public final class GraphicFenceParameters extends FenceParameters
Geotrigger fence parameters data created from graphics.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 aGraphicsOverlay
or graphics that are not displayed on aGeoView
. If you wish to track all of the graphics displayed in aGraphicsOverlay
, use aGraphicsOverlayFenceParameters
.A GraphicFenceParameters is created using a list of
Graphic
objects. The graphics can have point, line, or polygon geometry. AFenceParameters.getBufferDistance()
must be supplied for points or lines.- Since:
- 100.12.0
-
-
Constructor Summary
Constructors Constructor Description GraphicFenceParameters(double bufferDistance)
Creates a GraphicFenceParameters that will apply a buffer distance to any graphics that are added togetGraphics()
.GraphicFenceParameters(java.lang.Iterable<Graphic> graphics)
Creates a GraphicFenceParameters that will apply a buffer distance to the supplied graphics.GraphicFenceParameters(java.lang.Iterable<Graphic> graphics, double bufferDistance)
Creates a GraphicFenceParameters that will apply a buffer distance to any graphics that are added togetGraphics()
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Graphic>
getGraphics()
Gets the graphics to use in the GraphicFenceParameters.-
Methods inherited from class com.esri.arcgisruntime.geotriggers.FenceParameters
createFromGeoElement, getBufferDistance
-
-
-
-
Constructor Detail
-
GraphicFenceParameters
public GraphicFenceParameters(java.lang.Iterable<Graphic> graphics)
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:
java.lang.IllegalArgumentException
- if graphics is null- Since:
- 100.12.0
-
GraphicFenceParameters
public GraphicFenceParameters(java.lang.Iterable<Graphic> graphics, double bufferDistance)
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:
java.lang.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 Detail
-
getGraphics
public java.util.List<Graphic> 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
-
-