AGSFeatureLayer Class Reference
Description
Instances of this class allow you to display features from an ArcGIS Server map service layer/table or a feature service layer/table.
When using a feature service, this class allows you to view features, and also create, delete, and modify features. These edits can then be applied back to the server. If the layer supports attachments, the attachments property will be true
. If the feature layer is editable and has attachments, you can also add, update, delete, and query attachments. The symbology for the features is inferred from the feature service, you do not need to specify a renderer.
Feature Services are only supported by ArcGIS Server 10.0 or above.
When using a map service, you can only view features. You cannot create new features or edit existing features. You also need to assign this layer a renderer to properly symbolize the features if the map service is from ArcGIS Server 9.3.1 or earlier.
The features are retrieved from the service based on this layer's mode. The features are then held on the device and drawn much like AGSGraphicsLayer
does.
- Since:
- 1.0
List of all members.
Member Function Documentation
- (NSOperation *) addAttachment: |
|
(NSUInteger) |
objectId |
data: |
|
(NSData *) |
data |
filename: |
|
(NSString *) |
filename | |
|
|
| | |
Add an attachment to the feature specified by objectId
. Only applicable if editable and attachments are true
.
- Parameters:
-
| objectId | The object ID of the feature to which the attachment belongs. |
| data | The raw contents of the attachment. |
| filename | The name for the attachment. |
- Returns:
NSOperation
that performs the add.
- Since:
- 1.0
- (NSOperation *) addAttachment: |
|
(NSUInteger) |
objectId |
data: |
|
(NSData *) |
data |
filename: |
|
(NSString *) |
filename |
contentType: |
|
(NSString *) |
contentType | |
|
|
| | |
Add an attachment to the feature specified by objectId
. Only applicable if editable and attachments are true
.
- Parameters:
-
| objectId | The object ID of the feature to which the attachment belongs. |
| data | The raw contents of the attachment. |
| filename | The name for the attachment. |
| contentType | The content type of the attachment. If nil is passed, the api will try to match a content type to known file extensions. |
- Returns:
NSOperation
that performs the add.
- Since:
- 1.0
- (NSOperation *) addAttachment: |
|
(NSUInteger) |
objectId |
filepath: |
|
(NSString *) |
filepath | |
|
|
| | |
Add the provided attachment for the specified feature on the server.
- Parameters:
-
| objectId | The object ID of the feature to which the attachment belongs . |
| filepath | The path of the attachment on the device. |
- Returns:
NSOperation
that performs the add.
- Since:
- 1.0
- (NSOperation *) addAttachment: |
|
(NSUInteger) |
objectId |
filepath: |
|
(NSString *) |
filepath |
contentType: |
|
(NSString *) |
contentType | |
|
|
| | |
Add the provided attachment for the specified feature on the server.
- Parameters:
-
| objectId | The object ID of the feature to which the attachment belongs . |
| filepath | The path of the attachment on the device. |
| contentType | The content type of the attachment. If nil is passed, the api will try to match a content type to known file extensions. |
- Returns:
NSOperation
that performs the add.
- Since:
- 1.0
- (NSOperation *) addFeatures: |
|
(NSArray *) |
features |
|
|
Adds the specified features to the server.
- Parameters:
-
| features | The features to add. |
- Returns:
NSOperation
that performs the add.
- Since:
- 1.0
Adds graphic
to the layer. You must call dataChanged
to redraw the layer.
- Parameters:
-
| graphic | The graphic to be added. |
- Since:
- 1.0
- (void) addGraphics: |
|
(NSArray *) |
graphics |
|
|
Adds graphics
to the layer. You must call dataChanged
to redraw the layer.
- Parameters:
-
- Since:
- 1.0
- (NSOperation *) applyEditsWithFeaturesToAdd: |
|
(NSArray *) |
addFeatures |
toUpdate: |
|
(NSArray *) |
updateFeatures |
toDelete: |
|
(NSArray *) |
objectIds | |
|
|
| | |
A convenience method to add, delete, and update features on the server.
- Parameters:
-
| addFeatures | The array of features to add. |
| updateFeatures | The array of features to modify. |
| objectIds | The object IDs of the features to delete. |
- Returns:
NSOperation
that applies the edits.
- Since:
- 1.0
Clears the current selection.
- Since:
- 1.0
Creates a new feature based on the specified feature sub-type and feature template. Note, the new feature is only available on the device at this point, it is not commited to the server.
- Parameters:
-
| featureTemplate | The feature template to use while creating the feature. |
- Returns:
- The new feature.
- Since:
- 1.0
- See also:
- addFeatures:
or - applyEditsWithFeaturesToAdd:toUpdate:toDelete:
for committing the feature to the server.
Creates a new feature based on the specified feature sub-type. Note, the new feature is only available on the device at this point, it is not commited to the server. This method uses the first template in the feature type.
- Parameters:
-
| featureType | The type of feature to create. |
- Returns:
- The new feature.
- Since:
- 1.0
- See also:
- addFeatures:
or - applyEditsWithFeaturesToAdd:toUpdate:toDelete:
for committing the feature to the server.
- (UIView*) customViewForGraphic: |
|
(AGSGraphic *) |
graphic |
screenPoint: |
|
(CGPoint) |
screen |
mapPoint: |
|
(AGSPoint *) |
mapPoint | |
|
|
| | [optional, inherited] |
The custom view to be displayed in the callout. If you implement this function then the title, detail and image methods will not get called, as only the custom view will be displayed in the callout. The callout will be expanded to the dimensions of the custom view.
- Parameters:
-
| graphic | The graphic to display the custom view for. |
| screen | The coordinates at which the graphic callout will be displayed. |
| mapPoint | The coordinates at which the graphic callout will be displayed. |
- Returns:
- The custom view to be displayed in the callout.
- Since:
- 1.8
This method tells the graphics layer that the underlying graphics or symbology has changed and that it needs to be redrawn.
- Since:
- 1.0
Implements AGSLayer.
- (void) decodeWithJSON: |
|
(NSDictionary *) |
json |
|
[optional, inherited] |
Decode object from JSON representation.
- Parameters:
-
| json | The JSON representation of the object to be decoded. |
- Since:
- 1.0
- (NSOperation *) deleteAttachmentsForObjectId: |
|
(NSUInteger) |
objectId |
attachmentIds: |
|
(NSArray *) |
attachmentIds | |
|
|
| | |
Delete the specified attachments for the specified feature on the server.
- Parameters:
-
| objectId | The object ID of the feature to which the attachments belong. |
| attachmentIds | The attachment IDs of the attachments to be deleted. |
- Returns:
NSOperation
that performs the delete.
- Since:
- 1.0
- (NSOperation *) deleteFeaturesWithObjectIds: |
|
(NSArray *) |
objectIds |
|
|
Delete features on the server based on the specified OBJECTIDs
- Parameters:
-
| objectIds | The object IDs of the features to delete. |
- Returns:
NSOperation
that performs the delete.
- Since:
- 1.0
Deletes features on the server based on the specified parameters. Only features satisfying all parameters will be deleted.
- Parameters:
-
| where | The where clause to restrict the set of candidate features. |
| geometry | The geometry to be used while testing spatial relationships. |
| spatialRelation | The spatial relation which should be satisfied between the candidate features and the geometry. |
- Returns:
NSOperation
that performs the delete.
- Since:
- 1.0
- (NSString *) detailForGraphic: |
|
(AGSGraphic *) |
graphic |
screenPoint: |
|
(CGPoint) |
screen |
mapPoint: |
|
(AGSPoint *) |
map | |
|
|
| | [optional, inherited] |
Detail string to be displayed in the callout.
- Parameters:
-
| graphic | The graphic to display detail for. |
| screen | The coordinates at which the graphic callout will be displayed. |
| map | The coordinates at which the graphic callout will be displayed. |
- Returns:
- The detail text for the callout.
- Since:
- 1.0
- (NSDictionary *) encodeToJSON |
|
|
|
[optional, inherited] |
Encode and return JSON representation for object.
- Returns:
- JSON representation of object.
- Since:
- 1.0
Get new map image. The exportDelegate is notified when the image is exported. This method must be implemented by subclasses.
- Parameters:
-
| params | The input parameters for the export image operation. |
- Since:
- 1.0
A method to get an initialized, autoreleased layer with a URL of an ArcGIS Server Map or Feature Service layer.
- Parameters:
-
| url | URL to a map or feature service layer. |
| mode | The mode in which to retrieve features. |
- Returns:
- A new, autoreleased, feature layer object.
- Since:
- 1.0
A method to get an initialized, autoreleased layer with a URL of an ArcGIS Server Map or Feature Service layer.
- Parameters:
-
| url | URL to a map or feature service layer. |
| mode | The mode in which to retrieve features. |
| cred | AGSCredential used to access secure resource. |
- Returns:
- A new, autoreleased, feature layer object.
- Since:
- 1.0
- (AGSField*) findFieldWithName: |
|
(NSString *) |
fieldName |
|
|
Convenience method to find a field with a specified name.
- Parameters:
-
| fieldName | The name of the field to find. |
- Returns:
AGSField
object with specified name.
- Since:
- 1.8
A method to get an initialized and autoreleased graphics layer.
- Returns:
- A new, autoreleased, graphics layer object.
- Since:
- 1.0
- (UIImage*) imageForGraphic: |
|
(AGSGraphic *) |
graphic |
screenPoint: |
|
(CGPoint) |
screen |
mapPoint: |
|
(AGSPoint *) |
mapPoint | |
|
|
| | [optional, inherited] |
Image to be displayed in the callout to the left of the text. The image will be scaled to 40x40 points.
- Parameters:
-
| graphic | The graphic to display the image for. |
| screen | The coordinates at which the graphic callout will be displayed. |
| mapPoint | The coordinates at which the graphic callout will be displayed. |
- Returns:
- The image to be displayed in the callout.
- Since:
- 1.8
- (id) initWithJSON: |
|
(NSDictionary *) |
json |
|
[optional, inherited] |
Initialize and return object from JSON representation.
- Parameters:
-
| json | The JSON representation of the object to be created. |
- Returns:
- Object decoded from JSON representation.
- Since:
- 1.0
- (id) initWithLayerDefinitionJSON: |
|
(NSDictionary *) |
layerDefinitionJSON |
featureSetJSON: |
|
(NSDictionary *) |
featureSetJSON | |
|
|
| | |
A way to get an initialized layer that does not work with an ArcGIS Server map or feature service, but instead works a predefined set of features. In this mode, layer will not make any network connections because it already has all the information it needs to display features.
- Parameters:
-
- Since:
- 1.8
Initialize this layer with a URL of an ArcGIS Server Map or Feature Service layer.
- Parameters:
-
| url | URL to a map or feature service layer. |
| mode | The mode in which to retrieve features. |
- Returns:
- A new feature layer object.
- Since:
- 1.0
Initialize this layer with a URL of an ArcGIS Server Map or Feature Service layer.
- Parameters:
-
| url | URL to a map or feature service layer. |
| mode | The mode in which to retrieve features. |
| cred | AGSCredential used to access secure resource. |
- Returns:
- A new feature layer object.
- Since:
- 1.0
Initialize this layer, in a synchronous fashion, with a URL of an ArcGIS Server Map or Feature Service layer.
- Parameters:
-
| url | URL to a map or feature service layer. |
| mode | The mode in which to retrieve features. |
| cred | AGSCredential used to access secure resource. |
| error | Information about the error returned if init fails. |
- Returns:
- A new feature layer object.
- Since:
- 1.0
Initialize this layer, in a synchronous fashion, with a URL of an ArcGIS Server Map or Feature Service layer.
- Parameters:
-
| url | URL to a map or feature service layer. |
| mode | The mode in which to retrieve features. |
| error | Information about the error returned if init fails. |
- Returns:
- A new feature layer object.
- Since:
- 1.0
- (void) layerDidFailToLoad: |
|
(NSError *) |
error |
|
|
Method to notify the delegate that a layer failed to load. This method will also post a "LayerFailedToLoad" notification that can be observed by the developer.
- Parameters:
-
| error | Information regarding the cause of the layer failing to load. |
- Since:
- 1.0
Method to notify the delegate that a layer successfully loaded. This method will also post a "LayerDidLoad" notification that can be observed by the developer.
- Since:
- 1.0
- (AGSGraphic*) lookupFeatureWithObjectId: |
|
(NSInteger) |
objectId |
|
|
A convenience method to lookup a feature in the graphics collection using the specified object id.
- Parameters:
-
| objectId | The object ID of the graphic to be looked up. |
- Returns:
AGSGraphic
object corresponding to objectId
.
- Since:
- 1.0
- (NSInteger) objectIdForFeature: |
|
(AGSGraphic *) |
feature |
|
|
A convenience method to get the OBJECTID for specified feature.
- Parameters:
-
| feature | The feature to get OBJECTID for. |
- Returns:
- The OBJECTID for
feature
.
- Since:
- 1.0
- (NSOperation *) queryAttachmentInfosForObjectId: |
|
(NSUInteger) |
objectId |
|
|
Get information about all attachments that belong to the specified feature.
- Parameters:
-
| objectId | The object ID of the feature. |
- Returns:
NSOperation
that performs the query.
- Since:
- 1.0
- (NSOperation*) queryFeatureCount: |
|
(AGSQuery *) |
query |
|
|
Executes a query against the service layer pointed by the URL. The query returns only the feature count of matching features.
The queryDelegate will be notified when the operation completes or if an error is encountered.
- Parameters:
-
| query | Specifies the criteria for the query. |
- Returns:
- The operation performing the query.
- Since:
- 1.8
- See also:
- AGSFeatureLayerQueryDelegate
- (NSOperation*) queryFeatures: |
|
(AGSQuery *) |
query |
|
|
Executes a query against the service layer pointed by the URL. The query returns records matching the specified criteria. The records could be features, if the service layer represents a layer. Or the records could be simple records (without geometry) if the service layer represents a table. The queryDelegate will be notified when the operation completes or if an error is encountered.
The number of results returned by the query is limited by the service's configuration.
- Parameters:
-
| query | Specifies the criteria for the query. |
- Returns:
- The operation performing the query.
- Since:
- 1.0
- See also:
- AGSFeatureLayerQueryDelegate
- (NSOperation*) queryIds: |
|
(AGSQuery *) |
query |
|
|
Executes a query against the service layer pointed by the URL. The query returns only IDs of matching features. This is useful if you want to implement paging for results or if you want to only fetch result details on demand. Unlike queryFeatures: , there is no limit on the number of results returned by this query.
The queryDelegate will be notified when the operation completes or if an error is encountered.
- Parameters:
-
| query | Specifies the criteria for the query. |
- Returns:
- The operation performing the query.
- Since:
- 1.0
- See also:
- AGSFeatureLayerQueryDelegate
Executes a query against the service layer pointed by the URL. The query returns records that are related to the given set of features. The related records could be features, if the service layer is related to a layer. Or the related records could be simple records (without geometry) if the service layer is related to a table.
The queryDelegate will be notified when the operation completes or if an error is encountered.
- Parameters:
-
| query | Specifies the criteria for the query. |
- Returns:
- The operation performing the query.
- Since:
- 1.0
- See also:
- AGSFeatureLayerQueryDelegate
- (void) queryTask: |
|
(AGSQueryTask *) |
queryTask |
operation: |
|
(NSOperation *) |
op |
didExecuteWithFeatureCount: |
|
(NSInteger) |
count | |
|
|
| | [optional, inherited] |
Tells the delegate that AGSQueryTask
completed query with feature count successfully.
- Parameters:
-
| queryTask | The task which performed the query. |
| op | NSOperation that performed the query task. |
| count | The feature count returned by the query. |
- Since:
- 1.0
- (void) queryTask: |
|
(AGSQueryTask *) |
queryTask |
operation: |
|
(NSOperation *) |
op |
didExecuteWithFeatureSetResult: |
|
(AGSFeatureSet *) |
featureSet | |
|
|
| | [optional, inherited] |
Tells the delegate that AGSQueryTask
completed successfully with the provided results.
- Parameters:
-
| queryTask | The task which performed the query. |
| op | NSOperation that performed the query task. |
| featureSet | The feature set returned by executing query. |
- Since:
- 1.0
- (void) queryTask: |
|
(AGSQueryTask *) |
queryTask |
operation: |
|
(NSOperation *) |
op |
didExecuteWithObjectIds: |
|
(NSArray *) |
objectIds | |
|
|
| | [optional, inherited] |
Tells the delegate that AGSQueryTask
completed query for IDs successfully with the provided results.
- Parameters:
-
| queryTask | The task which performed the query. |
| op | NSOperation that performed the query task. |
| objectIds | The array of object IDs returned by executing query. |
- Since:
- 1.0
- (void) queryTask: |
|
(AGSQueryTask *) |
queryTask |
operation: |
|
(NSOperation *) |
op |
didExecuteWithRelatedFeatures: |
|
(NSDictionary *) |
relatedFeatures | |
|
|
| | [optional, inherited] |
Tells the delegate that AGSQueryTask
completed query for related features successfully with the provided results.
The related features are returned as a dictionary of key-value pairs. Keys contain NSNumber
objects representing IDs from AGSRelationshipQuery
objectIds
. Values contain arrays of AGSFeatureSet
objects representing the corresponding related features.
- Parameters:
-
| queryTask | The task which performed the query. |
| op | NSOperation that performed the query task. |
| relatedFeatures | The related features returned by executing query. |
- Since:
- 1.0
- (void) queryTask: |
|
(AGSQueryTask *) |
queryTask |
operation: |
|
(NSOperation *) |
op |
didFailQueryFeatureCountWithError: |
|
(NSError *) |
error | |
|
|
| | [optional, inherited] |
Tells the delegate that AGSQueryTask
encountered an error while performing query for feature count.
- Parameters:
-
| queryTask | The task which performed the query. |
| op | NSOperation that performed the query task. |
| error | Information about the error returned by the service. |
- Since:
- 1.0
- (void) queryTask: |
|
(AGSQueryTask *) |
queryTask |
operation: |
|
(NSOperation *) |
op |
didFailQueryForIdsWithError: |
|
(NSError *) |
error | |
|
|
| | [optional, inherited] |
Tells the delegate that AGSQueryTask
encountered an error while performing query for IDs.
- Parameters:
-
| queryTask | The task which performed the query. |
| op | NSOperation that performed the query task. |
| error | Information about the error returned by the service. |
- Since:
- 1.0
- (void) queryTask: |
|
(AGSQueryTask *) |
queryTask |
operation: |
|
(NSOperation *) |
op |
didFailRelationshipQueryWithError: |
|
(NSError *) |
error | |
|
|
| | [optional, inherited] |
Tells the delegate that AGSQueryTask
encountered an error while performing query for related features.
- Parameters:
-
| queryTask | The task which performed the query. |
| op | NSOperation that performed the query task. |
| error | Information about the error returned by the service. |
- Since:
- 1.0
- (void) queryTask: |
|
(AGSQueryTask *) |
queryTask |
operation: |
|
(NSOperation *) |
op |
didFailWithError: |
|
(NSError *) |
error | |
|
|
| | [optional, inherited] |
Tells the delegate that AGSQueryTask
encountered an error.
- Parameters:
-
| queryTask | The task which performed the query. |
| op | NSOperation that performed the query task. |
| error | Information about the error returned by the service. |
- Since:
- 1.0
Refreshes the features in the feature layer. The feature layer requeries all the features in the service, according to it's mode, and updates itself.
- Since:
- 1.0
- (void) removeAllGraphics |
|
|
|
|
Remove all graphics from the layer. You must call dataChanged
to redraw the layer.
- Since:
- 1.0
Remove graphic
from the graphics collection. You must call dataChanged
to redraw the layer.
- Parameters:
-
| graphic | The graphic to be removed. |
- Since:
- 1.0
- (void) resubmitWithURL: |
|
(NSURL *) |
url |
credential: |
|
(AGSCredential *) |
cred | |
|
|
| | |
If the layer failed to load with a specific url and credential, you can resubmit it with a new URL and credential. This function does nothing if the layer is already loaded. This function also does nothing if the layer is currently trying to load.
- Parameters:
-
| url | URL to the feature service. |
| cred | AGSCredential used to access the secured resource. |
- Since:
- 1.0
- (NSOperation *) retrieveAttachmentForObjectId: |
|
(NSUInteger) |
objectId |
attachmentId: |
|
(NSUInteger) |
attachmentId | |
|
|
| | |
Fetch the contents of the specified attachment.
- Parameters:
-
| objectId | The object ID of the feature to which the attachment belongs. |
| attachmentId | The ID of the attachment to fetch. |
- Returns:
NSOperation
that performs the retrieval.
- Since:
- 1.0.
- (NSArray*) selectedFeatures |
|
|
|
|
Features that have been selected.
- Since:
- 1.0
Selects a feature with the method specified. The feature must exist in the feature layer graphics collection.
- Parameters:
-
| feature | The feature that you want apply the selection method to |
| selectionMethod | Whether you want to add to, delete from, or entirely replace the existing set of selected features |
- Since:
- 1.8
Selects features based on the specified query. Selected features are symbolized using selectionSymbol if available, otherwise using the layer's renderer.
The queryDelegate will be notified when the operation completes or if an error is encountered.
- Parameters:
-
| query | Specifies the criteria for the query. |
| selectionMethod | Specifies whether the matching features should be added to, removed from, or replace the existing selected features. Possible values include
AGSFeatureLayerSelectionMethodAdd
AGSFeatureLayerSelectionMethodNew
AGSFeatureLayerSelectionMethodSubtract
|
- Returns:
- The operation performing the selection.
- Since:
- 1.0
- See also:
- - selectedFeatures
Convenience method to find the feature template associated with a particular feature.
- Parameters:
-
| feature | The feature to find the template for. |
| type | The type (if any) that the feature template was found in. |
- Returns:
AGSFeatureTemplate
object that the feature matches.
- Since:
- 1.8
- (NSString *) titleForGraphic: |
|
(AGSGraphic *) |
graphic |
screenPoint: |
|
(CGPoint) |
screen |
mapPoint: |
|
(AGSPoint *) |
map | |
|
|
| | [optional, inherited] |
Title text to be displayed in the callout.
- Parameters:
-
| graphic | The graphic to display a title for. |
| screen | The coordinates at which the graphic callout will be displayed. |
| map | The coordinates at which the graphic callout will be displayed. |
- Returns:
- The title text for the callout.
- Since:
- 1.0
- (NSOperation *) updateAttachment: |
|
(NSUInteger) |
objectId |
data: |
|
(NSData *) |
data |
filename: |
|
(NSString *) |
filename |
attachmentId: |
|
(NSUInteger) |
attachmentId | |
|
|
| | |
Update the specified attachment of the specified feature on the server using the provided attachment.
- Parameters:
-
| objectId | The object ID of the feature to which the attachment belongs. |
| data | The raw contents of the new attachment. |
| filename | The name for the new attachment. |
| attachmentId | The attachment ID of the old attachment that the new attachment will replace. |
- Returns:
NSOperation
that performs the update.
- Since:
- 1.0
- (NSOperation *) updateAttachment: |
|
(NSUInteger) |
objectId |
data: |
|
(NSData *) |
data |
filename: |
|
(NSString *) |
filename |
contentType: |
|
(NSString *) |
contentType |
attachmentId: |
|
(NSUInteger) |
attachmentId | |
|
|
| | |
Update the specified attachment of the specified feature on the server using the provided attachment.
- Parameters:
-
| objectId | The object ID of the feature to which the attachment belongs. |
| data | The raw contents of the new attachment. |
| filename | The name for the new attachment. |
| contentType | The content type of the attachment. If nil is passed, the api will try to match a content type to known file extensions. |
| attachmentId | The attachment ID of the old attachment that the new attachment will replace. |
- Returns:
NSOperation
that performs the update.
- Since:
- 1.0
- (NSOperation *) updateFeatures: |
|
(NSArray *) |
features |
|
|
Commits changes made to the specified features to the server.
- Parameters:
-
| features | The features to update. |
- Returns:
NSOperation
that performs the update.
- Since:
- 1.0
Property Documentation
- (BOOL) attachments [read, assign] |
If YES
, features in the layer may have attachments. Developers should call queryAttachmentInfosForObjectId: for each feature to see if it has any attachments.
- Since:
- 1.0
- (BOOL) autoRefreshOnExpiration [read, write, assign] |
Specifies whether or not the layer will refresh automatically when the expiration interval is reached. Default is NO
. This uses an NSTimer
for implementation. This is used only in OnDemand mode.
- Since:
- 1.0
- (float) bufferFactor [read, write, assign] |
This is the buffer around the current extent that features are retrieved for in OnDemand mode. Features are not retrieved again until either they expire or the map extent changes and is no longer in the buffered extent. Buffer factor can be between 0 and 10. If it is set to a value less than 1, every time the map extent is changed a requery will take place in OnDemand mode. This is not usually recommended.
- Since:
- 1.0
The credential to be used to access secured resources.
- Since:
- 1.0
Reimplemented from <AGSSecuredResource>.
- (NSString*) defaultDefinitionExpression [read, retain] |
Definition expression for the layer as defined by the service. This expression limits which features are returned by the service.
- Since:
- 1.0
- (NSString*) definitionExpression [read, write, copy] |
A definition expression limits the features displayed by this layer based on some a SQL query. Only those features whose attribute values match the SQL query are retrieved by the layer. Setting a definition expression is useful when the dataset is large and you do not want to bring all the features to the client for analysis.
This definition expression is combined with and applied in addition to the layer's defaultDefinitionExpression. Net result is that only those features that satisfy both expressions are retrieved by the layer.
- Since:
- 1.0
Delegate to be notified when the layer is loaded or fails to load. When this layer is loaded, a corresponding AGSLayerView
object is automatically set as the delegate. This delegate must not be replaced.
- Since:
- 1.0
- (NSString*) displayField [read, retain] |
The primary display field as defined by the service.
- Since:
- 1.0
- (BOOL) editable [read, assign] |
Specifies whether or not the layer is editable.
- Since:
- 1.0
Delegate to be notified when editing operations complete successfully or encounter an error.
- Since:
- 1.0
- (NSError*) error [read, retain, inherited] |
Information about the error associated with a layer.
- Since:
- 1.0
- (double) expirationInterval [read, write, assign] |
The time interval in seconds that features in the layer will expire when the layer is in OnDemand mode. Setting this to 0 will cause the features to not expire.
- Since:
- 1.0
Delegate to be notified of events related to exporting the map image. When this layer is loaded, a corresponding View object is automatically set as the exportDelegate
which should not be replaced.
- Since:
- 1.0
- (NSArray*) fields [read, retain] |
The fields available in the layer as defined by the service. The property is an array of AGSField
objects. Attributes of features belonging to this layer contain values for each field.
- Since:
- 1.0
- (AGSEnvelope*) fullEnvelope [read, assign, inherited] |
The geometry type of features contained in the layer as defined by the service. All features in the layer will have the same geometry type. Possible types include
AGSGeometryTypePoint
AGSGeometryTypePolyline
AGSGeometryTypePolygon
AGSGeometryTypeMultipoint
and AGSGeometryTypeEnvelope
types are not supported.
- Since:
- 1.0
- (NSMutableArray*) graphics [read, retain, inherited] |
The array of AGSGraphic
objects that need to be displayed on the map.
- Since:
- 1.0
This is an easy way to set the info template delegate for all graphics in the feature layer. It must be set before the features are fetched. For basic callout behavior, this can be set to the feature layer itself. By default it is nil
.
- Since:
- 1.0
- (AGSEnvelope*) initialEnvelope [read, write, retain, inherited] |
Gets or sets the initial envelope of the layer.
- Since:
- 1.0
Implements AGSLayer.
- (NSArray*) labelingInfo [read, retain] |
An array of AGSLabelClass
objects representing labeling information.
- Since:
- 1.8
- (NSString*) layerDescription [read, retain] |
The description of the layer as defined by the service.
- Since:
- 1.0
- (NSUInteger) layerId [read, assign] |
The ID of the layer as defined by the service.
- Since:
- 1.0
- (BOOL) loaded [read, assign, inherited] |
A property indicating whether the layer is loaded and ready to be used. When the layer is loaded, the value becomes YES
, and layer properties can be accessed.
- Since:
- 1.0
- See also:
- AGSLayerDelegate
- (double) maxAllowableOffset [read, write, assign] |
This is only applicable for feature layers that are not editable. The maximum allowable offset used for generalizing geometries returned by the query operation. The default is 0. If 0 is specified the value is not passed to the server in a query. The offset is in the units of the spatialReference. If a spatialReference is not defined the spatial reference of the map is used.
- Since:
- 1.0
- (double) maxScale [read, write, assign, inherited] |
The maximum scale at which this layer is visible. If the map is zoomed in beyond this scale, the layer will not be visible.
- Since:
- 1.0
Implements AGSDynamicLayer.
- (double) minScale [read, write, assign, inherited] |
The minimum scale at which this layer is visible. If the map is zoomed out beyond this scale, the layer will not be visible.
- Since:
- 1.0
Implements AGSDynamicLayer.
Mode in which the layer retrieves features from the service. Possible modes include
AGSFeatureLayerModeSnapshot
AGSFeatureLayerModeOnDemand
AGSFeatureLayerModeSelection
In Snapshot mode, the feature layer retrieves all of the features from the associated layer resource and displays them as graphics. This includes all features that satisfy the definitionExpression and defaultDefinitionExpression. Note that the number of features that are retrieved will be limited based on the ArcGIS Server's configuration (500 features by default for ArcGIS Server 9.3, and 1000 for ArcGIS Server 10).
In On-Demand mode, features are fetched asynchronously and when they are needed to be displayed. These include those features that satisfy the definitionExpression and defaultDefinitionExpression, and also fall within the map's current spatial and time extents.
In Selection mode, features are retrieved from the server only when they are selected. To work with selected features:
- Send
selectFeaturesWithQuery:selectionMethod:message:
to an instance of AGSFeatureLayer
. The queryDelegate will be notified when the operation completes or if an error is encountered.
- If operation completes successfully, retrieve the selected features from
featureSet
object of the queryDelegate's featureLayer:didSelectFeaturesWithFeatureSet:
method or send selectedFeatures
message to an instance of AGSFeatureLayer
.
When editing feature layers in selection mode, you will need to add the map service associated with the feature service to the map as a dynamic map service. Once the edit operation completes successfully, manually refresh the associated dynamic map service layer so that the modified features are rendered. If you do not have the map service added as a dynamic map service then the changes will not be visible. This is because once the edits are completed, the feature is no longer selected.
- Since:
- 1.0
- (NSString*) name [read, retain, inherited] |
The name of the layer. This property will be set by the framework when the layer is added to the map.
- Since:
- 1.8
- (NSString*) objectIdField [read, retain] |
The name of field which contains the OBJECTID.
- Since:
- 1.0
- See also:
- - objectIdForFeature: to conveniently get a feature's OBJECTID.
- (NSArray*) outFields [read, write, retain] |
An array of field names to include in the feature layer. If not specified, the feature layer will return the OBJECTID field and if applicable the start time field, end time field, type id field, display field and any fields associated with the renderer. You can specify ["*"] to fetch the values for all fields in the layer, this is useful when editing features.
- Since:
- 1.0
- (BOOL) queryable [read, assign] |
Specifies whether or not the layer is queryable. If the layer is not queryable, it will not be displayed.
- Since:
- 1.0
Delegate to be notified when query operations complete successfully or encounter an error.
- Since:
- 1.0
- (NSArray*) relationships [read, retain] |
Collection of AGSRelationship
objects that describe this layer's relationship with another layer or table in the service.
- Since:
- 1.0
- See also:
- - queryRelatedFeatures: to query features that participate in the relationship.
- (AGSRenderer*) renderer [read, write, retain, inherited] |
AGSRenderer
assigned to the layer. It is responsible for symbolizing the graphics. It is optional as each graphic may have it's own symbol. If a graphic has a symbol, that will be used for drawing the graphic instead of the renderer.
- Since:
- 1.0
- (AGSSymbol*) selectionSymbol [read, write, retain] |
The full envelope of the service. In the service's native spatial reference.
- Since:
- 1.8
- (NSString*) serviceLayerName [read, retain] |
The name of the layer as defined by the service.
- Since:
- 1.8
- (NSArray*) templates [read, retain] |
A collection 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 layer is based on an ArcGIS Server Feature Service layer.
- Since:
- 1.0
- (BOOL) timeAware [read, assign, inherited] |
A property indicating whether the layer is time-aware.
- Since:
- 1.0
A time definition is similar to a definitionExpression in that it limits the features displayed by this layer based on some contraints. A time defintion specifies contraints based on a time extent. Only those features whose time information falls within the given time extent are retrieved by the layer.
- Since:
- 1.8
Time information for the layer, such as start time field, end time field, track id field, layers time extent and the draw time interval. Only applicable if the layer is time aware.
- Since:
- 1.0
- (int) timeOffset [read, write, assign] |
The amount of time by which data in this layer is offset from the time when the data was recorded. Specify the units using the timeOffsetUnits property.
- Since:
- 1.8
Units of the amount specified by timeOffset. Refer to AGSTimeIntervalUnits
for possible values.
- Since:
- 1.8
- (NSString*) type [read, retain] |
The type of the layer as defined by the service. Could be either Feature Layer or Table.
- Since:
- 1.0
- (NSString*) typeIdField [read, retain] |
The name of the field which contains the sub-type information.
- Availability:
- This feature is only available with services from ArcGIS Server 10.0 or above
- Since:
- 1.0
- (NSArray*) types [read, retain] |
A collection of AGSFeatureType
objects representing feature sub-types in the layer. For example, a roads layer may contain 2 feature sub-types : highways and streets.
- Availability:
- This feature is only available with services from ArcGIS Server 10.0 or above
- Since:
- 1.0
- (AGSUnits) units [read, write, assign, inherited] |
The units the layer is in. Possible values include
AGSUnitsCentimeters
AGSUnitsDecimalDegrees
AGSUnitsDecimeters
AGSUnitsFeet
AGSUnitsInches
AGSUnitsKilometers
AGSUnitsMeters
AGSUnitsMiles
AGSUnitsMillimeters
AGSUnitsNauticalMiles
AGSUnitsPoints
AGSUnitsUnknown
AGSUnitsYards
- Since:
- 1.0
- (NSURL*) URL [read, copy] |
URL to a layer resource in the ArcGIS Server REST Services Directory. The layer resource can belong to a Map Service or a Feature Service and can represent either a layer or a table in the service.
Feature Service layers support both viewing and editing the features, whereas Map Service layers support only viewing.
- Since:
- 1.0
- (float) version [read, assign] |
The version of the service.
- Since:
- 1.8