ArcGIS Runtime SDK for iOS: AGSFeatureTable Class Reference
ArcGIS Runtime SDK for iOS  100.6
AGSFeatureTable Class Reference

Description

Subclasses represent a source for dataset that could include either geographic features or non-spatial records. You can query the dataset using attribute or spatial criteria, and if permitted, also edit the data. If the dataset contains geographic features you can display them on a map using AGSFeatureLayer.

Since
100
Inheritance diagram for AGSFeatureTable:
AGSLoadableBase <AGSPopupSource> AGSObject <AGSLoadable> AGSArcGISFeatureTable AGSFeatureCollectionTable AGSGeoPackageFeatureTable AGSShapefileFeatureTable AGSWFSFeatureTable AGSGeodatabaseFeatureTable AGSServiceFeatureTable

Instance Methods

(id< AGSCancelable >) - addFeature:completion:
 
(id< AGSCancelable >) - addFeatures:completion:
 
(void) - cancelLoad
 
(BOOL) - canDeleteFeature:
 
(BOOL) - canUpdateFeature:
 
(AGSFeature *) - createFeature
 
(AGSFeature *) - createFeatureWithAttributes:geometry:
 
(id< AGSCancelable >) - deleteFeature:completion:
 
(id< AGSCancelable >) - deleteFeatures:completion:
 
(nullable AGSField *) - fieldForName:
 
(void) - loadWithCompletion:
 
(id< AGSCancelable >) - queryExtentWithParameters:completion:
 
(id< AGSCancelable >) - queryFeatureCountWithParameters:completion:
 
(id< AGSCancelable >) - queryFeaturesWithParameters:completion:
 
(id< AGSCancelable >) - queryStatisticsWithParameters:completion:
 
(void) - retryLoadWithCompletion:
 
(id< AGSCancelable >) - updateFeature:completion:
 
(id< AGSCancelable >) - updateFeatures:completion:
 

Properties

BOOL canAddFeature
 
BOOL canEditGeometry
 
NSString * displayName
 
BOOL editable
 
AGSEnvelopeextent
 
AGSFeatureLayerfeatureLayer
 
NSArray< AGSField * > * fields
 
AGSGeometryType geometryType
 
BOOL hasGeometry
 
BOOL hasM
 
BOOL hasZ
 
NSError * loadError
 
AGSLoadStatus loadStatus
 
NSInteger numberOfFeatures
 
AGSPopupDefinitionpopupDefinition
 
BOOL popupEnabled
 
AGSSpatialReferencespatialReference
 
NSString * tableName
 

Method Documentation

§ cancelLoad()

- (void) cancelLoad
requiredinherited

Cancels loading if it is in progress, otherwise it does nothing. This should be called carefully because other objects could be waiting for loadWithCompletion: or retryLoadWithCompletion: to complete and this will call them all back with the error of NSUserCancelledError

Since
100

§ canDeleteFeature:()

- (BOOL) canDeleteFeature: (AGSFeature *)  feature

Indicates whether the source allows this particular feature to be deleted. The method first checks to verify if the source is capable of deleting any features in general. It also checks specific ownership-based access control policies of the source to see if the user attempting to perform the operation has persmissions to delete this particular feature.

Parameters
featureCan be nil, in which case, this method only checks if the source is capable of deleting any features in general
Returns
A boolean value
Since
100

§ canUpdateFeature:()

- (BOOL) canUpdateFeature: (AGSFeature *)  feature

Indicates whether the source allows updating this particular feature. The method first checks to verify if the source is capable of updating any features in general. It also checks specific ownership-based access control policies of the source to see if the user attempting to perform the operation has persmissions to edit this patricular feature.

Parameters
featureCan be nil, in which case, this method only checks if the source is capable of updating any features in general
Returns
A boolean value
Since
100

§ createFeature()

- (AGSFeature *) createFeature

Create a new, empty feature. Note, the new feature is only available in memory at this point, it is not commited to the dataset.

Returns
emtpy feature
Since
100
Note
The feature will need to be explicitly added to the dataset. See addFeature:completion:

§ createFeatureWithAttributes:geometry:()

- (AGSFeature *) createFeatureWithAttributes: (NSDictionary< NSString *, id > *)  attributes
geometry: (nullable AGSGeometry *)  geometry 

Create a new feature with the provided attribute values and, optionally, geometry. Note, the new feature is only available in memory at this point, it is not commited to the dataset.

Parameters
attributesfor the feature
geometryfor the feature
Returns
feature
Since
100
Note
The feature will need to be explicitly added to the dataset. See addFeature:completion:

§ fieldForName:()

- (nullable AGSField *) fieldForName: (NSString *)  fieldName

Convenience method to getting a field object given its name

Parameters
fieldNameThe name of the field.
Returns
field
Since
100

§ loadWithCompletion:()

- (void) loadWithCompletion: (nullable void(^)(NSError *__nullable error))  completion
requiredinherited

Loads data for the object asynchronously. The completion block is invoked upon completion.

You can call this method any number of times, however only one attempt is made to load the data. If it is already loading, it will just continue to load (i.e. not force a reload). If it has already loaded successfully, the completion block will be invoked right away. If it has already failed to load, the completion block will be invoked right away with error previously encountered. This method supports multiple callers and will call them all back on completion. However, each caller's completion block will be invoked once and only once.

Parameters
completionblock that is invoked when object loads successfully or fails to load. An error is passed to the block if the object fails to load.
Note
The completion block is always invoked on the main thread.
Since
100
See also
- cancelLoad to cancel loading
- retryLoadWithCompletion: to force reload

§ queryExtentWithParameters:completion:()

- (id<AGSCancelable>) queryExtentWithParameters: (AGSQueryParameters *)  parameters
completion: (void(^)(AGSEnvelope *__nullable extent, NSError *__nullable error))  completion 

Query the dataset to find the geographic extent covering matched features or records.

Parameters
parametersrepresenting the query criteria
completionThe block that is called when the query is complete
Returns
operation which can be canceled
Since
100.2

§ queryFeatureCountWithParameters:completion:()

- (id<AGSCancelable>) queryFeatureCountWithParameters: (AGSQueryParameters *)  parameters
completion: (void(^)(NSInteger count, NSError *__nullable error))  completion 

Query the dataset to find the number of matched features or records.

Parameters
parametersrepresenting the query criteria
completionThe block that is called when the query is complete
Returns
operation which can be canceled
Since
100.2

§ queryFeaturesWithParameters:completion:()

- (id<AGSCancelable>) queryFeaturesWithParameters: (AGSQueryParameters *)  parameters
completion: (nullable void(^)(AGSFeatureQueryResult *__nullable result, NSError *__nullable error))  completion 

Query the dataset to find specific features or records.

Parameters
parametersrepresenting the query criteria
completionThe block that is called when the query is complete
Returns
operation which can be canceled
Since
100

§ queryStatisticsWithParameters:completion:()

- (id<AGSCancelable>) queryStatisticsWithParameters: (AGSStatisticsQueryParameters *)  parameters
completion: (void(^)(AGSStatisticsQueryResult *__nullable result, NSError *__nullable error))  completion 

Query the dataset to compute statistics on matched features or records.

Parameters
parametersrepresenting the query criteria
completionThe block that is called when the query is complete
Returns
operation which can be canceled
Since
100.2

§ retryLoadWithCompletion:()

- (void) retryLoadWithCompletion: (nullable void(^)(NSError *__nullable error))  completion
requiredinherited

Tries to reload when an object has failed to load. This method should be called judiciously. It should be called when:

  1. you didn't have network connectivity earlier when it failed and you want to retry now that you have connectivity
  2. the server was down earlier when it failed and you want to retry
  3. the request is taking too long and you want to cancel it and retry, in which case you will first call cancelLoad and then this method

If the data hasn't started loading, it will start loading. If it is already loading, it will just continue to load. If it has already loaded successfully, calls back right away. If it has already failed to load, tries again. This method supports multiple callers and will call them all back on completion. However, each caller's completion block will be invoked once and only once.

Parameters
completionblock that is invoked when object loads successfully or fails to load. An error is passed to the block if the object fails to load.
Note
The completion block is always invoked on the main thread.
Since
100

Property Documentation

§ canAddFeature

- (BOOL) canAddFeature
readnonatomicassign

Indicates whether the source supports adding new features.

Since
100

§ canEditGeometry

- (BOOL) canEditGeometry
readnonatomicassign

Indicates whether the source supports updating geometry of existing features.

Since
100

§ displayName

- (NSString*) displayName
readwritenonatomiccopy

User-friendly name that can be displayed in the UI (for example in a Table of Contents)

Since
100.3

§ editable

- (BOOL) editable
readnonatomicassign

Indicates whether the dataset can be edited. For details on which fine-grained editing capabilites are supported, refer to canUpdateFeature: and canDeleteFeature:

Since
100

§ extent

- (AGSEnvelope*) extent
readnonatomicstrong

The extent of the dataset.

Since
100

§ featureLayer

- (AGSFeatureLayer*) featureLayer
readnonatomicweak

The feature layer created with this table, if any.

Since
100

§ fields

- (NSArray<AGSField*>*) fields
readnonatomiccopy

Array of AGSField objects representing the fields (columns) in the dataset.

Since
100

§ geometryType

- (AGSGeometryType) geometryType
readnonatomicassign

The type of geometry used by geographic feautres. Only applicable if hasGeometry is true.

Since
100

§ hasGeometry

- (BOOL) hasGeometry
readnonatomicassign

Indicates whether the dataset contains a geometry field (column). If YES, the dataset contains geographic features. If NO, the dataset contains non-spatial records, similar to a database table.

Since
100

§ hasM

- (BOOL) hasM
readnonatomicassign

Indicates whether features may contain M values

Since
100.2

§ hasZ

- (BOOL) hasZ
readnonatomicassign

Indicates whether features may contain Z values

Since
100.2

§ loadError

- (NSError*) loadError
readnonatomicstronginherited

The error that was encountered during the most recent load operation. Will be nil if the operation succeeded.

Since
100

§ loadStatus

- (AGSLoadStatus) loadStatus
readrequirednonatomicassigninherited

Status of the load operation.

Since
100

§ numberOfFeatures

- (NSInteger) numberOfFeatures
readnonatomicassign

The total number of features or records in the dataset.

Since
100

§ popupDefinition

- (AGSPopupDefinition*) popupDefinition
readwritenonatomicstronginherited

Information on how popups are defined for this source.

Since
100

§ popupEnabled

- (BOOL) popupEnabled
readwriterequirednonatomicassigninherited

Indicates whether popups are enabled on this source.

Since
100

§ spatialReference

- (AGSSpatialReference*) spatialReference
readnonatomicstrong

The spatial reference of the dataset.

Since
100

§ tableName

- (NSString*) tableName
readnonatomiccopy

Name of the dataset.

Since
100