ArcGIS Runtime SDK for iOS
100.15
|
A dataset from an individual layer or table in an ArcGIS map or feature service.
Instances of this class represent datasets in an individual layer or table of an ArcGIS map or feature service. The service may be hosted in the cloud on ArcGIS Online, or on-premises on an ArcGIS Server.
A service feature table has an AGSFeatureRequestMode
, which controls:
AGSFeatureRequestMode
.If the table's mode is AGSFeatureRequestModeOnInteractionCache
, features are requested from the server in response to user or developer interaction (pan or zoom) and are cached locally. Queries are executed on the cache or (if requested features are not resident in the cache) on the server. This mode is the default.
If the table's mode is AGSFeatureRequestModeOnInteractionNoCache
, features are always requested from the server. Features are not cached, and all queries are executed on the server.
If the table's mode is AGSFeatureRequestModeManualCache
, you must call AGSServiceFeatureTable::populateFromServiceWithParameters:clearCache:outfields:completion:
, which populates the local table with the features specified by AGSQueryParameters
and containing the attributes specified by outfields
parameter. Features are cached for the duration of the session and queries are executed against the cache.
If the table's feature request mode is AGSFeatureRequestModeOnInteractionCache
or AGSFeatureRequestModeOnInteractionNoCache
, ArcGISFeatures in the table initially contain a minimum set of attributes and goemetry that omits any m-values. This is an optimization for faster rendering.
To access all attributes (and geometry with m-values) in features you get from a query, do one of the following:
loadWithCompletion: (AGSLoadable-p)
on each returned feature individually AGSQueryFeatureFieldsLoadAll
, which performs the query and returns features fully loaded (with all attributes and any m-values defined by the service). See queryFeaturesWithParameters:queryFeatureFields:completion: (AGSServiceFeatureTable)
and AGSServiceFeatureTable::queryRelatedFeaturesWithFeature:parameters:queryFeatureFields:completion:
. loadOrRefreshFeatures:completion: (AGSServiceFeatureTable)
and pass an array of AGSArcGISFeature
to be loadedWhen used to create an AGSFeatureLayer
in an AGSMapView
, features are requested from the services in the correct spatial reference to match the spatial reference of the map. Use AGSArcGISRuntimeEnvironment::serviceCurveGeometryMode
to change how curve geometries are returned from the service, if supported (AGSArcGISFeatureServiceInfo::supportsTrueCurve
).
You can use a service feature table to access non-spatial tables from feature services where AGSFeatureTable::hasGeometry
is NO
. The feature request mode of the table must be AGSFeatureRequestModeManualCache
, and you must call AGSServiceFeatureTable::populateFromServiceWithParameters:clearCache:outfields:completion:
.
The parent class definition allows a service feature table to have editable attribute fields, feature templates, feature types, and editing capabilities defined in AGSArcGISFeatureLayerInfo::capabilities
. See AGSFeatureTemplate
and AGSFeatureType
.
When using a Feature service, you can potentially create, delete, and update the data depending upon whether the service allows those operations, who owns the data, and what ownership-based access control policies are in place. Refer to the AGSFeatureTable::editable
, canUpdateFeature: (AGSFeatureTable)
, canDeleteFeature: (AGSFeatureTable)
, for information on what's permitted.
Edits can be performed through AGSFeatureTable::addFeature:completion
, addFeatures:completion: (AGSFeatureTable)
, deleteFeature:completion: (AGSFeatureTable)
, deleteFeatures:completion: (AGSFeatureTable)
, updateFeature:completion: (AGSFeatureTable)
, updateFeatures:completion: (AGSFeatureTable)
. However, these edits only affect the temporary geodatabase and must be committed to the service through applyEditsWithCompletion: (AGSServiceFeatureTable)
.
If the service supports attachments (AGSArcGISFeatureTable::hasAttachments
), you can also view and potentially edit the attachments.
You can also query the data based on SQL expressions and/or spatial relationships.
This class is typically used in conjunction with AGSFeatureLayer
to display feature data on a map. It can handle temporary network outages while still allowing you to work with the data that has already been retrieved from the service. Your edits are immediately peristed to the local geodatabase and can be applied to the service later when network connectivity is restored.
Service feature table adopts the loadable pattern; many of its properties are initialized asynchronously after connecting to the service. See AGSLoadable
for more information.
A service feature table might require authentication to access the service.
AGSFeatureLayer
to visualize features from this dataset on a map. Class Methods | |
(instancetype) | + serviceFeatureTableWithItem: |
(instancetype) | + serviceFeatureTableWithItem:layerID: |
(instancetype) | + serviceFeatureTableWithTable:relationshipInfo: |
(instancetype) | + serviceFeatureTableWithURL: |
- (id<AGSCancelable>) addedFeaturesCountWithCompletion: | (void(^)(NSInteger count, NSError *__nullable error)) | completion |
Retrieves the number of features that have been locally added to the dataset, but not yet to the originating source.
For mobile geodatabases created by ArcGIS Pro, this method retrieves 0
because there is no concept of syncing.
completion | A block that is invoked when the operation finishes. The count parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
- (id<AGSCancelable>) addedFeaturesWithCompletion: | (void(^)(AGSFeatureQueryResult *__nullable result, NSError *__nullable error)) | completion |
Retrieves the features that have been locally added to the dataset, but not yet to the originating source.
For mobile geodatabases created by ArcGIS Pro, this method retrieves no features because there is no concept of syncing.
completion | A block that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
|
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
- (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.
feature | Can be nil, in which case, this method only checks if the source is capable of deleting any features in general |
- (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.
feature | Can be nil, in which case, this method only checks if the source is capable of updating any features in general |
- (void) clearCacheWithKeepLocalEdits: | (BOOL) | keepLocalEdits |
Clear all the data in the table, including any temporary edits.
- (AGSContingentValuesResult *) contingentValuesWithFeature: | (AGSArcGISFeature *) | feature | |
field: | (NSString *) | field | |
Returns possible values for the specified field, in the context of defined contingencies.
This method iterates over all the field groups that the input field participates in. For each, it looks at the input feature's field values for the other fields participating in that field group. Contingencies that are satisfied by the other fields are identified, and their values for the input field are aggregated. These are returned in an AGSContingentValuesResult
, which contains a dictionary of field group names to an array of AGSContingentValue
objects accessed via AGSContingentValuesResult::contingentValuesByFieldGroup
, specifying possible values for the input field that will satisfy a contingency in that field group. If the feature participates in multiple field groups and there are values that will satisfy all groups, they will be returned by AGSContingentValuesResult::contingentValuesAllGroups
.
feature | The feature. |
field | The name of the field for which to get possible values. |
AGSContingentValuesResult
. - (AGSFeature *) createFeature |
Create a new, empty feature. Note, the new feature is only available in memory at this point, it is not committed to the dataset.
addFeature:completion:
- (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 committed to the dataset.
attributes | for the feature |
geometry | for the feature |
addFeature:completion:
- (nullable AGSArcGISFeature *) createFeatureWithSubtype: | (AGSFeatureSubtype *) | featureSubtype |
Creates a new feature based on the specified feature subtype. Note, the new feature is only available in memory at this point, it is not commited to the dataset.
featureSubtype | The subtype of feature to create. |
addFeature:completion: (AGSFeatureTable)
- (nullable AGSArcGISFeature *) createFeatureWithSubtype: | (AGSFeatureSubtype *) | featureSubtype | |
geometry: | (AGSGeometry *) | geometry | |
Creates a new feature based on the specified feature subtype and geoemtry. Note, the new feature is only available in memory at this point, it is not commited to the dataset.
featureSubtype | The type of feature to create. |
geometry | The geometry for the feature. |
addFeature:completion: (AGSFeatureTable)
- (nullable AGSArcGISFeature *) createFeatureWithTemplate: | (AGSFeatureTemplate *) | featureTemplate |
Creates a new feature based on the specified feature template. Note, the new feature is only available in memory at this point, it is not commited to the dataset.
featureTemplate | The feature template to use while creating the feature. |
addFeature:completion: (AGSFeatureTable)
- (nullable AGSArcGISFeature *) createFeatureWithTemplate: | (AGSFeatureTemplate *) | featureTemplate | |
geometry: | (AGSGeometry *) | geometry | |
Creates a new feature based on the specified feature template and geometry. Note, the new feature is only available in memory at this point, it is not commited to the dataset.
featureTemplate | The feature template to use while creating the feature. |
geometry | The geometry for the feature. |
addFeature:completion: (AGSFeatureTable)
- (nullable AGSArcGISFeature *) createFeatureWithType: | (AGSFeatureType *) | featureType |
Creates a new feature based on the specified feature type. Note, the new feature is only available in memory at this point, it is not commited to the dataset.
featureType | The type of feature to create. |
addFeature:completion: (AGSFeatureTable)
- (nullable AGSArcGISFeature *) createFeatureWithType: | (AGSFeatureType *) | featureType | |
geometry: | (AGSGeometry *) | geometry | |
Creates a new feature based on the specified feature type and geoemtry. Note, the new feature is only available in memory at this point, it is not commited to the dataset.
featureType | The type of feature to create. |
geometry | The geometry for the feature. |
addFeature:completion: (AGSFeatureTable)
- (id<AGSCancelable>) deletedFeaturesCountWithCompletion: | (void(^)(NSInteger count, NSError *__nullable error)) | completion |
Retrieves the number of features that have been locally deleted from the dataset, but not yet from the originating source.
For mobile geodatabases created by ArcGIS Pro, this method retrieves 0
because there is no concept of syncing.
completion | A block that is invoked when the operation finishes. The count parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
- (id<AGSCancelable>) deletedFeaturesWithCompletion: | (void(^)(AGSFeatureQueryResult *__nullable result, NSError *__nullable error)) | completion |
Retrieves the features that have been locally deleted from the dataset, but not yet from the originating source.
For mobile geodatabases created by ArcGIS Pro, this method retrieves no features because there is no concept of syncing.
completion | A block that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
- (void) doCancelLoading |
Never call this method directly. The framework calls this method on a background thread when cancelLoad (AGSLoadable-p)
is called. It is meant to be overriden by subclasses. Subclasses should override this method to cancel loading their data and call loadDidFinishWithError: (AGSLoadableBase(ForSubclassEyesOnly))
at the end passing in an error representing NSUserCancelledError
.
Provided by category AGSLoadableBase(ForSubclassEyesOnly).
- (void) doStartLoading: | (BOOL) | retrying |
Never call this method directly. The framework calls this method on a background thread when loadWithCompletion: (AGSLoadable-p)
or retryLoadWithCompletion: (AGSLoadable-p)
is called. It is meant to be overriden by subclasses. Subclasses should override this method to load their data and call loadDidFinishWithError: (AGSLoadableBase(ForSubclassEyesOnly))
upon completion, passing in the error if any.
retrying | flag that is true if this method was called from retryLoadWithCompletion: (AGSLoadable-p) . |
Provided by category AGSLoadableBase(ForSubclassEyesOnly).
- (nullable AGSFeatureTemplate *) featureTemplateForName: | (NSString *) | name |
Convenience method to retrieve a feature template given its name.
name | The name of a feature template. |
- (nullable AGSFeatureType *) featureTypeForName: | (NSString *) | name |
Convenience method to retrieve a feature type given its name.
name | The name of a feature type. |
- (nullable AGSField *) fieldForName: | (NSString *) | fieldName |
Convenience method to getting a field object given its name
fieldName | The name of the field. |
- (BOOL) hasLocalEdits |
Checks whether the feature table has local edits.
For AGSServiceFeatureTable
, local edits are edits that have not yet been applied to the feature service. For AGSGeodatabaseFeatureTable
, local edits are edits that have been made since the last acknowledged upload. For mobile geodatabases created by ArcGIS Pro, this method returns NO
because there is no concept of uploading or applying edits. For mobile geodatabases, use AGSGeodatabaseFeatureTable::hasLocalEditsSinceWithDate:
.
- (instancetype) initWithItem: | (AGSItem *) | item |
Creates a new service feature table object from a feature service or feature layer portal item.
If the portal item is a feature service, the AGSServiceFeatureTable
will be created from the first layer on the service. If the portal item is a feature layer, the AGSServiceFeatureTable
will be created from the feature layer.
item | A feature service or feature layer AGSPortalItem . |
AGSServiceFeatureTable::item
- (instancetype) initWithItem: | (AGSItem *) | item | |
layerID: | (NSInteger) | layerID | |
Creates a table with the provided information.
item | representing an ArcGIS feature service. The item's type must be AGSPortalItemTypeFeatureService . |
layerID | ID of an individual layer in the ArcGIS feature service represented by the item . |
- (instancetype) initWithTable: | (AGSServiceFeatureTable *) | table | |
relationshipInfo: | (AGSRelationshipInfo *) | relationshipInfo | |
Creates a table to be the one that participates in the specified relationship with the provided table.
table | that this table is related to through the specified relationship. |
relationshipInfo | specifying the relationship that this table participates in with the provided table . |
- (instancetype) initWithURL: | (NSURL *) | url |
Creates a table with the given URL.
url | The URL of an individual layer or table in an ArcGIS map or feature service whose data needs to be accessed or edited. |
- (void) loadDidFinishWithError: | (nullable NSError *) | error |
Only subclasses should call this method in doStartLoading: (AGSLoadableBase(ForSubclassEyesOnly))
and doCancelLoading (AGSLoadableBase(ForSubclassEyesOnly))
when done loading or failed to load.
Provided by category AGSLoadableBase(ForSubclassEyesOnly).
- (id<AGSCancelable>) loadOrRefreshFeatures: | (NSArray< AGSArcGISFeature * > *) | features | |
completion: | (nullable void(^)(NSError *__nullable error)) | completion | |
Loads all attributes and geometries for not loaded features, and refetches attributes and geometries for previously loaded features. All features loaded or refreshed by this method will have m-values if defined by the service. Note that an m-value might be NAN
. Features you get from queryFeaturesWithParameters:queryFeatureFields:completion:
or queryRelatedFeaturesForFeature:parameters:queryFeatureFields:completion:
might be in the minimally loaded state (minimum attributes required for rendering and no m-values). To load all attributes, pass an array of the features to this method. Any feature requested, but not returned, by the server will have its object id cleared (set to an invalid negative value) to indicate it is no longer associated with the service feature table. After calling this method, any non-applied edits on the table will be lost. This method will not refresh feature attachments. Use fetchAttachmentsWithCompletion: (AGSArcGISFeature)
to retrieve attachments.
features | that need to be loaded or refreshed. When the operation completes, the attributes and geometry of these features is updated. |
completion | block that is invoked when the operation finishes. The error parameter is populated if the operation encounters an error. |
|
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.
completion | block that is invoked when object loads successfully or fails to load. An error is passed to the block if the object fails to load. |
- cancelLoad
to cancel loading - retryLoadWithCompletion:
to force reload - (id<AGSCancelable>) localEditsCountWithCompletion: | (void(^)(NSInteger result, NSError *_Nullable error)) | completion |
Fetches the number of features that were added, updated, or deleted since the last sync.
For mobile geodatabases created by ArcGIS Pro, this method returns a count of 0
because there is no concept of syncing.
completion | A block that is invoked when the operation finishes. The result parameter is zero or more if the operation completed successfully, otherwise the error parameter is populated. |
- (id<AGSCancelable>) localEditsWithCompletion: | (void(^)(AGSLocalFeatureEditsResult *_Nullable result, NSError *_Nullable error)) | completion |
Fetches a AGSLocalFeatureEditsResult
object which contains an enumerator property that can iterate over the feature edits that were added, updated, or deleted since the last sync.
For a mobile geodatabase created by ArcGIS Pro, there are no feature edits as there is no concept of syncing.
Note that edits inside a transaction (between calls to beginTransaction: (AGSGeodatabase)
and either commitTransaction: (AGSGeodatabase)
or rollbackTransaction: (AGSGeodatabase)
) share a common AGSLocalFeatureEdit::editDate
and may not be returned in a consistent order.
completion | A block that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
- (void) onLoadStatusChanged |
Never call this method directly. The framework calls this method on a background thread when AGSLoadable::loadStatus
changes is called. Subclasses can optionally implement this to know when their loading status has changed.
Provided by category AGSLoadableBase(ForSubclassEyesOnly).
- (id<AGSCancelable>) populateFromServiceWithParameters: | (AGSQueryParameters *) | parameters | |
clearCache: | (BOOL) | clearCache | |
outFields: | (NSArray< NSString * > *) | outFields | |
completion: | (nullable void(^)(AGSFeatureQueryResult *__nullable result, NSError *__nullable error)) | completion | |
Queries the feature service and places the resulting features in the local table, which is cached for the duration of the session. The AGSServiceFeatureTable
must have its AGSServiceFeatureTable::featureRequestMode
set to AGSFeatureRequestModeManualCache
. This method is useful for non-geographic data. It's also helpful when you want to avoid accessing the service for a feature whose geometry is in the current extent of the AGSMap
or AGSScene
. Specifying an empty NSArray
for outfields
results in the minimum set of fields being used when populating the local table. This is the same set of attributes described for AGSFeatureRequestModeOnInteractionCache
or AGSFeatureRequestModeOnInteractionNoCache
.
parameters | defining which data should be requsted from the service and added to the table |
clearCache | If YES , then clearCacheWithKeepLocalEdits: will be called before populating the local table. If NO , the resulting features will be appended to the local table. |
outFields | An array of strings. Each string is the name of a field to be used when populating the cache. If the array contains the single string "*" , then all fields will be used. If the object ID field name is not provided as part of the NSArray , no features will be returned from the completion block. |
completion | A block that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
AGSFeatureServiceSessionType
- (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 | representing the query criteria |
completion | The block that is called when the query is complete |
AGSFeatureServiceSessionType
- (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 | representing the query criteria |
completion | The block that is called when the query is complete |
AGSFeatureServiceSessionType
- (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 | representing the query criteria |
completion | The block that is called when the query is complete |
AGSFeatureServiceSessionType
- (id<AGSCancelable>) queryFeaturesWithParameters: | (AGSQueryParameters *) | parameters | |
queryFeatureFields: | (AGSQueryFeatureFields) | queryFeatureFields | |
completion: | (nullable void(^)(AGSFeatureQueryResult *__nullable result, NSError *__nullable error)) | completion | |
Queries features from this table's cache and/or from the feature service used to create this table. If the request mode of the table is AGSFeatureRequestModeManualCache
, then the query is always performed on the local table. If the mode is AGSFeatureRequestModeOnInteractionCache
, then the query is performed on the local cache, provided that the geometries of the features are within an extent that has been cached; otherwise, the query is performed on the server. If the mode is AGSFeatureRequestModeOnInteractionNoCache
, the query is always performed on the server.
The AGSQueryFeatureFields
constants control which fields will be included with the returned features.
AGSFeatureRequestModeManualCache
, contains all fields that you specified when calling AGSServiceFeatureTable::populateFromServiceWithParameters:clearCache:outfields:completion:
. AGSFeatureRequestModeOnInteractionCache
or AGSFeatureRequestModeOnInteractionNoCache
, initially contains features with a minimum set of attribute required for rendering. You must load a feature to access all its attributes. The convenience constant AGSQueryFeatureFieldsLoadAll
automatically loads the returned features into the local table, which makes all attributes available. Note that you can query on any attribute defined by the feature service's table. If the attribute is not in the minimum set of attributes in your local table, the query will be performed on the server.parameters | Options for controlling the operation. |
queryFeatureFields | Options for controlling what fields are in the features of the query result. |
completion | A block that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
AGSFeatureServiceSessionType
- (id<AGSCancelable>) queryRelatedFeatureCountForFeature: | (AGSArcGISFeature *) | feature | |
completion: | (void(^)(NSInteger count, NSError *__nullable error)) | completion | |
Performs a query that returns the number of related features to the supplied feature.
feature | The feature which should be queried for the number of related features. |
completion | Block that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
AGSFeatureServiceSessionType
- (id<AGSCancelable>) queryRelatedFeatureCountForFeature: | (AGSArcGISFeature *) | feature | |
parameters: | (AGSRelatedQueryParameters *) | parameters | |
completion: | (void(^)(NSInteger count, NSError *__nullable error)) | completion | |
Performs a query that returns the number of related features to supplied feature based on the parameters.
feature | The feature which should be queried for the number of related features. |
parameters | The parameters to the query. |
completion | Block that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
AGSFeatureServiceSessionType
- (id<AGSCancelable>) queryRelatedFeaturesForFeature: | (AGSArcGISFeature *) | feature | |
completion: | (void(^)(NSArray< AGSRelatedFeatureQueryResult * > *__nullable results, NSError *__nullable error)) | completion | |
Performs a query that returns all features (spatial or non-spatial) that are related to the specified feature. The related features must belong to a feature table that is related to this feature table. Also, the related tables must be part of either the map's operational layers collection (AGSGeoModel::operationalLayers
) through a feature layer if they are spatial, or the map's tables collection (AGSGeoModel::tables
) directly if they are non-spatial.
feature | A feature to find related features (spatial and non-spatial). |
completion | A block that is invoked when the operation finishes. The results parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
AGSFeatureServiceSessionType
- (id<AGSCancelable>) queryRelatedFeaturesForFeature: | (AGSArcGISFeature *) | feature | |
parameters: | (AGSRelatedQueryParameters *) | parameters | |
completion: | (void(^)(NSArray< AGSRelatedFeatureQueryResult * > *__nullable results, NSError *__nullable error)) | completion | |
Performs a query that returns features (spatial or non-spatial) that are related to the specified feature based on the provided parameters. The related features must belong to a feature table that is related to this feature table. Also, the related tables must be part of either the map's operational layers collection (AGSGeoModel::operationalLayers
) through a feature layer if they are spatial, or the map's tables collection (AGSGeoModel::tables
) directly if they are non-spatial.
feature | A feature to find related features (spatial and non-spatial). |
parameters | Parameters specifying which related features to query. |
completion | A block that is invoked when the operation finishes. The results parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
AGSFeatureServiceSessionType
- (id<AGSCancelable>) queryRelatedFeaturesForFeature: | (AGSArcGISFeature *) | feature | |
parameters: | (AGSRelatedQueryParameters *) | parameters | |
queryFeatureFields: | (AGSQueryFeatureFields) | queryFeatureFields | |
completion: | (void(^)(NSArray< AGSRelatedFeatureQueryResult * > *__nullable result, NSError *__nullable error)) | completion | |
Queries the table for features (spatial or non-spatial) that are related to the specified feature based on the provided parameters. The related features must belong to a feature table that is related to this feature table. Also, the related tables must be part of either the map's operational layers collection (AGSGeoModel::operationalLayers
) through a feature layer if they are spatial, or the map's tables collection (AGSGeoModel::tables
) directly if they are non-spatial.
feature | A feature for which to find related features (spatial and non-spatial). |
parameters | A parameters object specifying which related features to query. |
queryFeatureFields | Query feature fields specifying which attribute fields should be included in the result. |
completion | A block that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
AGSFeatureServiceSessionType
- (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 | representing the query criteria |
completion | The block that is called when the query is complete |
AGSFeatureServiceSessionType
- (nullable NSArray<AGSArcGISFeatureTable*> *) relatedTables |
All feature tables (spatial or non-spatial) that are related to this feature table. The related tables must be part of either the map's operational layers collection (AGSGeoModel::operationalLayers
) through a feature layer if they are spatial, or the map's tables collection (AGSGeoModel::tables
) directly if they are non-spatial.
- (nullable NSArray<AGSArcGISFeatureTable*> *) relatedTablesWithRelationshipInfo: | (AGSRelationshipInfo *) | relationshipInfo |
The feature tables (spatial or non-spatial) that are related to this feature table through the specified relationship. The related feature tables must be a part of either the map's operational layers collection (AGSGeoModel::operationalLayers
) through a feature layer if they are spatial, or the map's tables collection (AGSGeoModel::tables
) directly if they are non-spatial.
relationshipInfo | Relationship information for specifying the relationship based on which results should be returned. |
|
requiredinherited |
Tries to reload when an object has failed to load. This method should be called judiciously. It should be called when:
cancelLoad
and then this methodIf 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.
completion | block that is invoked when object loads successfully or fails to load. An error is passed to the block if the object fails to load. |
+ (instancetype) serviceFeatureTableWithItem: | (AGSItem *) | item |
Creates a new service feature table object from a feature service or feature layer portal item.
If the portal item is a feature service, the AGSServiceFeatureTable
will be created from the first layer on the service. If the portal item is a feature layer, the AGSServiceFeatureTable
will be created from the feature layer.
item | A feature service or feature layer AGSPortalItem . |
AGSServiceFeatureTable::item
+ (instancetype) serviceFeatureTableWithItem: | (AGSItem *) | item | |
layerID: | (NSInteger) | layerID | |
Creates a table with the provided information.
item | representing an ArcGIS feature serivce. The item's type must be AGSPortalItemTypeFeatureService . |
layerID | ID of an individual layer in the ArcGIS feature service represented by the item . |
item
. + (instancetype) serviceFeatureTableWithTable: | (AGSServiceFeatureTable *) | table | |
relationshipInfo: | (AGSRelationshipInfo *) | relationshipInfo | |
Creates a table to be the one that participates in the specified relationship with the provided table.
table | that this table is related to through the specified relationship. |
relationshipInfo | specifying the relationship that this table participates in with the provided table . |
+ (instancetype) serviceFeatureTableWithURL: | (NSURL *) | URL |
Creates a table with the given URL.
URL | The URL of an individual layer or table in an ArcGIS map or feature service whose data needs to be accessed or edited. |
URL
. - (id<AGSCancelable>) undoLocalEditsWithCompletion: | (nullable void(^)(NSError *__nullable error)) | completion |
Undoes any local edits to features and attachments since the last time edits were succesfully applied to the server.
You can use addedFeaturesWithCompletion: (AGSArcGISFeatureTable)
, deletedFeaturesWithCompletion: (AGSArcGISFeatureTable)
, and updatedFeaturesWithCompletion: (AGSArcGISFeatureTable)
to find out which features have local edits that will be reverted. If you are holding on to an instance of a feature whose local edit is reverted, you will need to discard that instance and retrieve a new instance by querying the table.
undoLocalEditsWithCompletion:
is meant to be used for single table workflows or tables without geodatabase behavior (see below). If the service which the table belongs to has geodatabase behavior (see below), it is highly recommended to use undoLocalEditsWithCompletion: (AGSServiceGeodatabase)
. Undoing edits in one table can cause data inconsistencies between the local cache and the service if undoLocalEditsWithCompletion:
is used.
For example, when tables have a composite relationship, undoing only the origin feature would violate the composite relationship rule that an origin and destination feature must be either deleted together or not at all.
Areas which have geodatabase behavior:
completion | A block that is invoked when the operation finishes. The error parameter is populated if the operation encounters an error. |
AGSFeatureServiceSessionType
- (id<AGSCancelable>) updatedFeaturesCountWithCompletion: | (void(^)(NSInteger count, NSError *__nullable error)) | completion |
Retrieves the number of features that have been locally updated in the dataset, but not yet in the originating source.
For mobile geodatabases created by ArcGIS Pro, this method retrieves 0
because there is no concept of syncing.
completion | A block that is invoked when the operation finishes. The count parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
- (id<AGSCancelable>) updatedFeaturesWithCompletion: | (void(^)(AGSFeatureQueryResult *__nullable result, NSError *__nullable error)) | completion |
Retrieves the features that have been locally updated in the dataset, but not yet in the originating source.
For mobile geodatabases created by ArcGIS Pro, this method retrieves no features because there is no concept of syncing.
completion | A block that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
- (NSArray<AGSContingencyConstraintViolation *> *) validateContingencyConstraintsWithFeature: | (AGSArcGISFeature *) | feature |
Returns an array of contingency constraint violations based on the input feature. An empty array indicates that all contingencies associated with the feature are valid.
feature | The feature. |
AGSContingencyConstraintViolation
. - (id<AGSCancelable>) validateRelationshipConstraintsForFeature: | (AGSArcGISFeature *) | feature | |
completion: | (void(^)(AGSRelationshipConstraintViolationType relationshipConstraintViolationType, NSError *__nullable error)) | completion | |
Checks to see if performing edit operations (addFeature:completion: (AGSFeatureTable)
or updateFeature:completion: (AGSFeatureTable)
) with the provided feature could lead to a relationship constraint violation. This method makes network calls to query for the related features if they are not present locally
addFeature:completion: (AGSFeatureTable)
, updateFeature:completion: (AGSFeatureTable)
do not error due to relationship constraint violations. Rather, it is the responsibility of the developer to use this method to explicitly check for violations after the edit is performed. Alternatively, you can recover from violations in a back office operation after applying edits or syncing with the service, if you choose to do so. See ArcGIS Desktop Validate Features process.The following are types of violations that may be reported:
AGSRelationshipConstraintViolationTypeOrphaned
: In a composite relationship, adding an orphan feature to the destination table without relating it to an origin feature. To recover from this violation, relate the feature to a valid origin feature. AGSRelationshipConstraintViolationTypeCardinality
- cardinality violations: feature | A feature for which relationship constraints need to be validated. |
completion | A block that is invoked when the operation finishes. The relationshipConstraintViolationType parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
- relateToFeature: (AGSArcGISFeature)
to relate two features. - unrelateToFeature: (AGSArcGISFeature)
to unrelate two features.
|
readwriterequirednonatomiccopyinherited |
The API key to access API key enabled services and resources in ArcGIS Online.
An API key is a unique key used to authorize access to specific services and resources in ArcGIS Online. It is also used to monitor access to those services. An API key is created and managed in the ArcGIS developer dashboard and is tied to a specific ArcGIS account.
In addition to setting an API key at a global level for your application using the AGSArcGISRuntimeEnvironment::APIKey
property, you can set an AGSAPIKeyResource::APIKey
property on any ArcGIS Runtime class that implements AGSAPIKeyResource
. When you set an individual AGSAPIKeyResource::APIKey
property on an AGSAPIKeyResource
it will override the default key at the global level (on the AGSArcGISRuntimeEnvironment::APIKey
property, in other words), enabling more granular usage telemetry and management for ArcGIS Online resources used by your app. Classes that expose an API key property by implementing AGSAPIKeyResource
include:
|
readwritenonatomicassign |
This factor determines the size of the buffer around the map's current extent for which data is retrieved from the service. Data is not retrieved again until either it expires or the map extent changes and is no longer in the buffered extent. Buffer factor can be up to 10
. If it is set to 0
or 1
, every time the map extent is changed data for that extent will be requested from the service. Default value is 2
.
AGSFeatureRequestModeOnInteractionCache
|
readnonatomicassigninherited |
Indicates whether the source supports adding new features.
|
readnonatomicassigninherited |
Indicates whether the source supports updating geometry of existing features.
|
readnonatomicstronginherited |
The table's contingent values definition.
The contingent values definition must be loaded after the table has loaded. If the list of field groups is empty after loading, then no contingent values are defined for this table.
|
readwritenonatomicstronginherited |
Security credentials to access the remote resource. Only applicable if the resource is secured.
|
readnonatomiccopyinherited |
The code for the default feature subtype. This value is for the field specified in the subtypeField
property.
#featureSubTypes
for the list of feature subtypes available.
|
readwritenonatomiccopy |
An expression which is a SQL statement where clause to filter out the features to be queried. The definition expression string uses the SQL-92 where clause syntax (https://en.wikipedia.org/wiki/SQL-92). Be sure to escape special characters in the expression string as required for your platform. The DATE keyword expects the date format yyyy-mm-dd and the TIMESTAMP keyword expects the time stamp format yyyy-mm-dd hh:mm:ss. See the ArcGIS Blog article entitled "Querying Feature Services Date-Time Queries" (https://www.esri.com/arcgis-blog/products/api-rest/data-management/querying-feature-services-date-time-queries/) for more information.
|
readwritenonatomiccopyinherited |
User-friendly name that can be displayed in the UI (for example in a Table of Contents)
|
readnonatomicassigninherited |
Indicates whether the dataset can be edited. For details on which fine-grained editing capabilites are supported, refer to canUpdateFeature:
and canDeleteFeature:
|
readnonatomiccopyinherited |
Array of AGSField
objects representing the subset of fields (columns) in the dataset that are editable.
|
readnonatomicstronginherited |
The extent of the dataset.
|
readnonatomicweakinherited |
The feature layer this table is associated with, or created from, if any. nil
if this table is not associated with a feature layer. This property is populated when the AGSFeatureLayer
is created from the AGSFeatureTable
.
AGSFeatureTable::layer
instead Provided by category AGSFeatureTable(AGSDeprecated).
|
readwritenonatomicassign |
Specifies how data should be retrieved from the service. Default is AGSFeatureRequestModeOnInteractionCache
.
|
readnonatomiccopyinherited |
An array of AGSFeatureSubtype
objects representing feature sub-types in the layer. For example, a roads layer may contain 2 feature sub-types : highways and streets.
|
readnonatomiccopyinherited |
An array of AGSFeatureTemplate
objects representing feature templates for the layer. Usually only present if the layer does not contain feature sub-types. Only applicable if this dataset is based on an ArcGIS feature service.
|
readnonatomiccopyinherited |
An array of AGSFeatureType
objects representing feature sub-types in the layer. For example, a roads layer may contain 2 feature sub-types : highways and streets.
|
readnonatomiccopyinherited |
|
readwritenonatomiccopy |
The geodatabase version.
|
readnonatomicassigninherited |
The type of geometry used by geographic feautres. Only applicable if hasGeometry
is true.
|
readnonatomiccopyinherited |
The name of field which contains the GLOBALID for each feature.
|
readnonatomicassigninherited |
Indicates whether features may have attachments.
|
readnonatomicassigninherited |
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.
|
readnonatomicassigninherited |
Indicates whether features may contain M values
|
readnonatomicassigninherited |
Indicates whether features may contain Z values
|
readnonatomicstrong |
Item representing an ArcGIS feature serivce. Only available if the table was instantiated with an item to begin with.
|
readnonatomicweakinherited |
The layer this table is associated with, or created from, if any. This can be an AGSAnnotationLayer
, an AGSDimensionLayer
, an AGSFeatureLayer
, or nil
if this table is not associated with a layer. This property is populated when the layer is created from the AGSFeatureTable
.
|
readnonatomicstronginherited |
Information about the source this dataset originates from.
|
readnonatomicstronginherited |
The error that was encountered during the most recent load operation. Will be nil if the operation succeeded.
|
readrequirednonatomicassigninherited |
Status of the load operation.
|
readnonatomicassigninherited |
The total number of features or records in the dataset.
|
readnonatomiccopyinherited |
The name of field which contains the OBJECTID for each feature.
|
readwritenonatomicstronginherited |
The AGSPopupDefinition
associated with the popup source. This property will be nil
if an error occurs or if the popup source is not associated with a popup definition.
|
readwriterequirednonatomicassigninherited |
Indicates whether popups are enabled on this source.
|
readwritenonatomicstronginherited |
The AGSRequestConfiguration object which defines the behavior and policies to use when accessing the remote resource. The default will be nil. If it is nil the [AGSRequestConfiguration globalConfiguration] will be used.
|
readnonatomicstrong |
The service geodatabase this service feature table is a part of.
|
readnonatomicassigninherited |
The ID of the layer this table corresponds to in the service.
|
readnonatomicstronginherited |
The spatial reference of the dataset.
|
readnonatomiccopyinherited |
The name of the field which contains the sub-type information for each feature.
|
readnonatomiccopyinherited |
Name of the dataset.
|
readnonatomiccopyinherited |
The name of the field which contains the sub-type information for each feature.
|
readnonatomiccopyinherited |
Unknown data from the source JSON. Unknown JSON is a dictionary of values that was in the source JSON but was not parsed by the Runtime.
NSDictionary
|
readnonatomiccopyinherited |
Unsupported data from the source JSON. Unsupported JSON is a dictionary of values that are supported by web maps, but not exposed through the native Runtime API.
NSDictionary
|
readrequirednonatomicstronginherited |
The URL of the remote resource.
|
readwritenonatomicassigninherited |
Indicates whether the dataset should be visualized using advanced CIM symbols. The default is NO
. Servers which don't support this simply ignore the parameter and return regular symbols instead.