|
ArcGIS Runtime SDK for iOS
100.15
|
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.
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 |
| + (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.
| geoElement | An individual AGSGeoElement used to create an AGSFenceParameters object. |
| bufferDistance | A buffer distance in meters to apply to the AGSGeoElement when checking if an AGSGeotrigger condition is met. |
AGSFenceParameters created from an AGSGeoElement. | + (instancetype) graphicFenceParametersWithBufferDistance: | (double) | bufferDistance |
Creates an AGSGraphicFenceParameters that will apply a buffer distance to any graphics that are added to AGSGraphicFenceParameters::graphics.
| bufferDistance | A buffer distance in meters to apply to graphics when checking if an AGSGeotrigger condition is met. |
| + (instancetype) graphicFenceParametersWithGraphics: | (NSArray< AGSGraphic * > *) | graphics |
Creates an AGSGraphicFenceParameters that will apply a buffer distance to the supplied graphics.
| graphics | An array of graphics that should be used as fences. |
| + (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.
| graphics | An array of graphics that should be used as fences. |
| bufferDistance | A buffer distance in meters to apply to the graphics when checking if an AGSGeotrigger condition is met. |
| - (instancetype) initWithBufferDistance: | (double) | bufferDistance |
Creates an AGSGraphicFenceParameters that will apply a buffer distance to any graphics that are added to AGSGraphicFenceParameters::graphics.
| bufferDistance | A buffer distance in meters to apply to graphics when checking if an AGSGeotrigger condition is met. |
| - (instancetype) initWithGraphics: | (NSArray< AGSGraphic * > *) | graphics |
Creates an AGSGraphicFenceParameters that will apply a buffer distance to the supplied graphics.
| graphics | An array of graphics that should be used as fences. |
| - (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.
| graphics | An array of graphics that should be used as fences. |
| bufferDistance | A buffer distance in meters to apply to the graphics when checking if an AGSGeotrigger condition is met. |
|
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 NAN AGSLinearUnitIDMeters If your fences use a point or polyline geometry then you must set this property to a value greater than 0.
|
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.