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

Description

Geotrigger fence data required for an AGSFenceGeotrigger.

The AGSFenceParameters defines all of the target geometries of an AGSFenceGeotrigger. Typically, it is made up of many polygons that objects from the AGSGeotriggerFeed can enter or exit. However, if you set an AGSFenceParameters::bufferDistance, 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:

Inheritance diagram for AGSFenceParameters:
AGSObject AGSFeatureFenceParameters AGSGraphicFenceParameters AGSGraphicsOverlayFenceParameters

Class Methods

(nullable AGSFenceParameters *) + fenceParametersWithGeoElement:bufferDistance:
 

Properties

double bufferDistance
 

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

Property Documentation

◆ bufferDistance

- (double) bufferDistance
readnonatomicassign

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