GraphicFenceParameters

class GraphicFenceParameters : 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 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.

Constructors

Link copied to clipboard
fun GraphicFenceParameters(graphics: Iterable<Graphic>)

Creates a GraphicFenceParameters that will apply a buffer distance to the supplied graphics.

Link copied to clipboard
fun GraphicFenceParameters(graphics: Iterable<Graphic>, bufferDistance: Double)

Creates a GraphicFenceParameters that will apply a buffer distance to any graphics that are added to GraphicFenceParameters.getGraphics().

Link copied to clipboard
fun GraphicFenceParameters(bufferDistance: Double)

Creates a GraphicFenceParameters that will apply a buffer distance to any graphics that are added to GraphicFenceParameters.getGraphics().

Properties

Link copied to clipboard
val bufferDistance: Double

A buffer distance in meters to apply when checking if a FenceGeotrigger condition is met. For example, if the rule is "enters within 50 meters" you use a FenceGeotrigger.getRuleType() of FenceRuleType.Enter and set this property to 50.

Link copied to clipboard
val graphics: MutableList<Graphic>