ArcGIS Runtime SDK for iOS: AGSGraphicFenceParameters Class Reference
ArcGIS Runtime SDK for iOS  100.15
AGSGraphicFenceParameters Class Reference

Description

Geotrigger fence parameters data created from graphics.

The graphics used to create an AGSGraphicFenceParameters provide an array of geometries and attributes that define targets for an AGSFenceGeotrigger 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".

An AGSGraphicFenceParameters allows you to track a specific set of AGSGraphic objects: these can be a selection of the graphics from an AGSGraphicsOverlay or graphics that are not displayed on an AGSGeoView. If you wish to track all of the graphics displayed in an AGSGraphicsOverlay, use an AGSGraphicsOverlayFenceParameters.

An AGSGraphicFenceParameters is created using a list of AGSGraphic objects. The graphics can have point, line, or polygon geometry. An AGSFenceParameters::bufferDistance must be supplied for points or lines.

Since
100.12
Inheritance diagram for AGSGraphicFenceParameters:
AGSFenceParameters AGSObject

Instance Methods

(instancetype) - initWithBufferDistance:
 
(instancetype) - initWithGraphics:
 
(instancetype) - initWithGraphics:bufferDistance:
 

Class Methods

(nullable AGSFenceParameters *) + fenceParametersWithGeoElement:bufferDistance:
 
(instancetype) + graphicFenceParametersWithBufferDistance:
 
(instancetype) + graphicFenceParametersWithGraphics:
 
(instancetype) + graphicFenceParametersWithGraphics:bufferDistance:
 

Properties

double bufferDistance
 
NSMutableArray< AGSGraphic * > * graphics
 

Method Documentation

◆ fenceParametersWithGeoElement:bufferDistance:

+ (nullable AGSFenceParameters *) fenceParametersWithGeoElement: (id< AGSGeoElement >)  geoElement
bufferDistance: (double)  bufferDistance 

Static factory function to create an AGSFenceParameters.

This method creates the appropriate type of AGSFenceParameters based on the type of the AGSGeoElement that was supplied. The supported types of AGSGeoElement are AGSGraphic and AGSFeature.

If passed an unsupported AGSGeoElement, this method will return nil.

Parameters
geoElementAn individual AGSGeoElement used to create an AGSFenceParameters object.
bufferDistanceA buffer distance in meters to apply to the AGSGeoElement when checking if an AGSGeotrigger condition is met.
Returns
An AGSFenceParameters created from an AGSGeoElement.
Since
100.12

◆ graphicFenceParametersWithBufferDistance:

+ (instancetype) graphicFenceParametersWithBufferDistance: (double)  bufferDistance

Creates an AGSGraphicFenceParameters that will apply a buffer distance to any graphics that are added to AGSGraphicFenceParameters::graphics.

Parameters
bufferDistanceA buffer distance in meters to apply to graphics when checking if an AGSGeotrigger condition is met.
Since
100.12

◆ graphicFenceParametersWithGraphics:

+ (instancetype) graphicFenceParametersWithGraphics: (NSArray< AGSGraphic * > *)  graphics

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

Parameters
graphicsAn array of graphics that should be used as fences.
Since
100.12

◆ graphicFenceParametersWithGraphics:bufferDistance:

+ (instancetype) graphicFenceParametersWithGraphics: (NSArray< AGSGraphic * > *)  graphics
bufferDistance: (double)  bufferDistance 

Creates an AGSGraphicFenceParameters that will apply a buffer distance to any graphics that are added to AGSGraphicFenceParameters::graphics.

Parameters
graphicsAn array of graphics that should be used as fences.
bufferDistanceA buffer distance in meters to apply to the graphics when checking if an AGSGeotrigger condition is met.
Since
100.12

◆ initWithBufferDistance:

- (instancetype) initWithBufferDistance: (double)  bufferDistance

Creates an AGSGraphicFenceParameters that will apply a buffer distance to any graphics that are added to AGSGraphicFenceParameters::graphics.

Parameters
bufferDistanceA buffer distance in meters to apply to graphics when checking if an AGSGeotrigger condition is met.
Since
100.12

◆ initWithGraphics:

- (instancetype) initWithGraphics: (NSArray< AGSGraphic * > *)  graphics

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

Parameters
graphicsAn array of graphics that should be used as fences.
Since
100.12

◆ initWithGraphics:bufferDistance:

- (instancetype) initWithGraphics: (NSArray< AGSGraphic * > *)  graphics
bufferDistance: (double)  bufferDistance 

Creates an AGSGraphicFenceParameters that will apply a buffer distance to any graphics that are added to AGSGraphicFenceParameters::graphics.

Parameters
graphicsAn array of graphics that should be used as fences.
bufferDistanceA buffer distance in meters to apply to the graphics when checking if an AGSGeotrigger condition is met.
Since
100.12

Property Documentation

◆ bufferDistance

- (double) bufferDistance
readnonatomicassigninherited

A buffer distance in meters to apply when checking if an AGSFenceGeotrigger condition is met.

For example, if the rule is "enters within 50 meters" you use an AGSFenceGeotrigger::ruleType of AGSFenceRuleTypeEnter and set this property to 50.

Buffers are Geodetic and created using the following default values:

  • AGSGeodeticCurveTypeShapePreserving
  • Max deviation = NAN
  • AGSLinearUnitIDMeters

If your fences use a point or polyline geometry then you must set this property to a value greater than 0.

Since
100.12

◆ graphics

- (NSMutableArray<AGSGraphic *>*) graphics
readnonatomicstrong

The graphics to use in the AGSGraphicFenceParameters.

This array will be tracked when monitoring an AGSGeotrigger such that any graphics that are added will be included and any that are removed will no longer be checked.

The AGSGeometry of each AGSGraphic will be buffered by the buffer distance.

Since
100.12