10.2.5: AGSFeatureLayer Class Reference
10.2.5
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
AGSFeatureLayer Class Reference

Description

Instances of this class represent a feature layer. The layer allows you to display features from an individual layer or table in an ArcGIS Server map service or a feature service .

When using a map service, the layer allows you to only view features. You cannot create new features or edit existing features. If the service is from ArcGIS Server 9.3.1 or earlier,you will need to assign this layer a renderer to properly symbolize the features. If the service is from ArcGIS Server 10 or greater, the renderer information will be inherited from the service.

The layer retrieves features from the service based on its mode. The features are then held on the device and drawn much like AGSGraphicsLayer does.

When using a feature service, the layer can also potentially allow you to create, delete, and update features depending upon whether the backend feature service allows those operations, who owns the feature, and what ownership-based access control policies are in place (for example, should someone be allowed to delete/update a feature they do not own?) You should check canCreate, canDeleteFeature: (AGSFeatureLayer), canUpdateFeature: (AGSFeatureLayer), and canUpdateGeometry properties to see what is allowed.

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.

Note, Feature Services are only avaialble on ArcGIS Server 10.0 or above.

Notifications

The layer posts AGSFeatureLayerDidLoadFeaturesNotification when it finishes loading features from a remote feature service.

See also
Conceptual Doc: ArcGIS Feature Layer
Sample: Feature Layer Editing
Sample: Online-Offline Editing
Since
1.0
Inheritance diagram for AGSFeatureLayer:
AGSGraphicsLayer <AGSCoding> <AGSInfoTemplateDelegate> <AGSSecuredResource> <AGSGDBFeatureSourceInfo> <AGSLayerCalloutDelegate> AGSLayer <AGSHitTestable>

Instance Methods

(NSOperation *) - addAttachment:data:filename:
 
(NSOperation *) - addAttachment:data:filename:contentType:
 
(NSOperation *) - addAttachment:filepath:
 
(NSOperation *) - addAttachment:filepath:contentType:
 
(NSOperation *) - addFeatures:
 
(void) - addGraphic:
 
(void) - addGraphics:
 
(NSOperation *) - applyEditsWithFeaturesToAdd:toUpdate:toDelete:
 
(AGSAttachmentManager *) - attachmentManagerForFeature:
 
(BOOL) - callout:willShowForFeature:layer:mapPoint:
 
(BOOL) - canDeleteFeature:
 
(BOOL) - canUpdateFeature:
 
(void) - clearAttachmentManagerForFeatureWithObjectId:
 
(void) - clearAttachmentManagers
 
(void) - clearSelection
 
(AGSView *) - customViewForGraphic:screenPoint:mapPoint:
 
(void) - decodeWithJSON:
 
(int) - defaultDpi
 
(NSOperation *) - deleteAttachmentsForObjectId:attachmentIds:
 
(NSOperation *) - deleteFeaturesWithObjectIds:
 
(NSOperation *) - deleteFeaturesWithWhereClause:geometry:spatialRelation:
 
(NSString *) - detailForGraphic:screenPoint:mapPoint:
 
(NSString *) - editSummaryForFeature:
 
(NSDictionary *) - encodeToJSON
 
(AGSGraphic *) - featureWithTemplate:
 
(AGSGraphic *) - featureWithType:
 
(AGSField *) - findFieldWithName:
 
(AGSImage *) - imageForGraphic:screenPoint:mapPoint:
 
(id) - initWithFullEnvelope:
 
(id) - initWithFullEnvelope:renderingMode:
 
(id) - initWithJSON:
 
(id) - initWithLayerDefinitionJSON:featureSet:
 
(id) - initWithLayerDefinitionJSON:featureSetJSON:
 
(id) - initWithSpatialReference:
 
(id) - initWithURL:mode:
 
(id) - initWithURL:mode:credential:
 
(id) - initWithURL:mode:credential:error:
 
(id) - initWithURL:mode:error:
 
(BOOL) - isGraphicSelected:
 
(BOOL) - isInScale
 
(void) - layerDidFailToLoad:
 
(void) - layerDidLoad
 
(AGSGraphic *) - lookupFeatureWithObjectId:
 
(void) - mapDidUpdate:
 
(long long) - objectIdForFeature:
 
(NSOperation *) - queryAttachmentInfosForObjectId:
 
(NSOperation *) - queryFeatureCount:
 
(NSOperation *) - queryFeatures:
 
(NSOperation *) - queryIds:
 
(NSOperation *) - queryRelatedFeatures:
 
(void) - refresh
 
(void) - removeAllGraphics
 
(void) - removeGraphic:
 
(void) - removeGraphics:
 
(void) - resubmit
 
(void) - resubmitWithURL:credential:
 
(NSOperation *) - retrieveAttachmentForObjectId:attachmentId:
 
(NSArray *) - selectedGraphics
 
(void) - selectFeature:withSelectionMethod:
 
(NSOperation *) - selectFeaturesWithQuery:selectionMethod:
 
(void) - setSelected:forGraphic:
 
(void) - spatialReferenceStatusInitialized
 
(AGSFeatureTemplate *) - templateForFeature:type:
 
(NSString *) - titleForGraphic:screenPoint:mapPoint:
 
(NSOperation *) - updateAttachment:data:filename:attachmentId:
 
(NSOperation *) - updateAttachment:data:filename:contentType:attachmentId:
 
(NSOperation *) - updateFeatures:
 

Class Methods

(id) + featureServiceLayerWithURL:mode:
 
(id) + featureServiceLayerWithURL:mode:credential:
 
(id) + graphicsLayer
 

Properties

BOOL advancedSymbols
 
BOOL allowCallout
 
BOOL allowHitTest
 
BOOL allowLayerConsolidation
 
BOOL attachments
 
BOOL autoRefreshOnExpiration
 
CGFloat bufferFactor
 
id< AGSLayerCalloutDelegatecalloutDelegate
 
BOOL canCreate
 
BOOL canDelete
 
BOOL canUpdate
 
BOOL canUpdateGeometry
 
CGFloat constraintFactor
 
AGSCredentialcredential
 
AGSCredentialCachecredentialCache
 
NSString * defaultDefinitionExpression
 
NSString * definitionExpression
 
id< AGSLayerDelegatedelegate
 
NSString * displayField
 
AGSEditFieldsInfoeditFieldsInfo
 
id
< AGSFeatureLayerEditingDelegate
editingDelegate
 
NSString * endTimeField
 
NSError * error
 
double expirationInterval
 
NSArray * fields
 
AGSEnvelopefullEnvelope
 
AGSGeometryType geometryType
 
NSArray * graphics
 
NSUInteger graphicsCount
 
BOOL hasVersionedData
 
id< AGSInfoTemplateDelegateinfoTemplateDelegate
 
AGSEnvelopeinitialEnvelope
 
BOOL isTableOnly
 
NSArray * labelingInfo
 
NSString * layerDescription
 
NSUInteger layerId
 
BOOL loaded
 
AGSMapViewmapView
 
double maxAllowableOffset
 
double maxScale
 
double minScale
 
AGSFeatureLayerMode mode
 
NSString * name
 
NSString * objectIdField
 
CGFloat opacity
 
NSArray * outFields
 
BOOL queryable
 
id< AGSFeatureLayerQueryDelegatequeryDelegate
 
NSArray * relationships
 
AGSRendererrenderer
 
AGSGraphicsLayerRenderingMode renderingMode
 
BOOL renderNativeResolution
 
NSURLRequestCachePolicy requestCachePolicy
 
AGSColorselectionColor
 
AGSSymbolselectionSymbol
 
AGSEnvelopeserviceFullEnvelope
 
NSString * serviceLayerName
 
AGSSpatialReferencespatialReference
 
BOOL spatialReferenceStatusValid
 
NSString * startTimeField
 
NSArray * templates
 
BOOL timeAware
 
AGSTimeExtenttimeDefinition
 
AGSTimeInfotimeInfo
 
double timeOffset
 
AGSTimeIntervalUnits timeOffsetUnits
 
NSTimeInterval timeoutInterval
 
NSString * type
 
NSString * typeIdField
 
NSArray * types
 
NSURL * URL
 
CGFloat version
 
BOOL visible
 

Method Documentation

- (NSOperation *) addAttachment: (NSUInteger)  objectId
data: (NSData *)  data
filename: (NSString *)  filename 

Add an attachment to the feature specified by objectId on the server. Only applicable if AGSFeatureLayer::attachments property is true and the feature (to which this attachment belongs) can be edited (canUpdateFeature:).

Parameters
objectIdThe object ID of the feature to which the attachment belongs.
dataThe raw contents of the attachment.
filenameThe name for the attachment.
Returns
NSOperation that performs the add.
Since
1.0
See also
- featureLayer:operation:didAttachmentEditsWithResults: (AGSFeatureLayerEditingDelegate-p) , method on delegate for success
- featureLayer:operation:didFailAttachmentEditsWithError: (AGSFeatureLayerEditingDelegate-p) , method on delegate for error

Provided by category AGSFeatureLayer(Editing).

- (NSOperation *) addAttachment: (NSUInteger)  objectId
data: (NSData *)  data
filename: (NSString *)  filename
contentType: (NSString *)  contentType 

Add an attachment to the feature specified by objectId on the server. Only applicable if AGSFeatureLayer::attachments property is true and the feature (to which this attachment belongs) can be edited (canUpdateFeature:).

Parameters
objectIdThe object ID of the feature to which the attachment belongs.
dataThe raw contents of the attachment.
filenameThe name for the attachment.
contentTypeThe 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
See also
- featureLayer:operation:didAttachmentEditsWithResults: (AGSFeatureLayerEditingDelegate-p) , method on delegate for success
- featureLayer:operation:didFailAttachmentEditsWithError: (AGSFeatureLayerEditingDelegate-p) , method on delegate for error

Provided by category AGSFeatureLayer(Editing).

- (NSOperation *) addAttachment: (NSUInteger)  objectId
filepath: (NSString *)  filepath 

Add the provided attachment for the specified feature on the server. Only applicable if AGSFeatureLayer::attachments property is true and the feature (to which this attachment belongs) can be edited (canUpdateFeature:).

Parameters
objectIdThe object ID of the feature to which the attachment belongs .
filepathThe path of the attachment on the device.
Returns
NSOperation that performs the add.
Since
1.0
See also
- featureLayer:operation:didAttachmentEditsWithResults: (AGSFeatureLayerEditingDelegate-p) , method on delegate for success
- featureLayer:operation:didFailAttachmentEditsWithError: (AGSFeatureLayerEditingDelegate-p) , method on delegate for error

Provided by category AGSFeatureLayer(Editing).

- (NSOperation *) addAttachment: (NSUInteger)  objectId
filepath: (NSString *)  filepath
contentType: (NSString *)  contentType 

Add the provided attachment for the specified feature on the server. Only applicable if AGSFeatureLayer::attachments property is true and the feature (to which this attachment belongs) can be edited (canUpdateFeature:).

Parameters
objectIdThe object ID of the feature to which the attachment belongs .
filepathThe path of the attachment on the device.
contentTypeThe 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
See also
- featureLayer:operation:didAttachmentEditsWithResults: (AGSFeatureLayerEditingDelegate-p) , method on delegate for success
- featureLayer:operation:didFailAttachmentEditsWithError: (AGSFeatureLayerEditingDelegate-p) , method on delegate for error

Provided by category AGSFeatureLayer(Editing).

- (NSOperation *) addFeatures: (NSArray *)  features

Adds the specified features to the server.

Only applicable if AGSFeatureLayer::canCreate is true.

Parameters
featuresThe features to add.
Returns
NSOperation that performs the add.
Since
1.0
See also
- featureLayer:operation:didFeatureEditsWithResults: (AGSFeatureLayerEditingDelegate-p) , method on delegate for success
- featureLayer:operation:didFailFeatureEditsWithError: (AGSFeatureLayerEditingDelegate-p) , method on delegate for error

Provided by category AGSFeatureLayer(Editing).

- (void) addGraphic: (AGSGraphic *)  graphic

Adds graphic to the layer.

Parameters
graphicThe graphic to be added.
Since
1.0
- (void) addGraphics: (NSArray *)  graphics

Adds graphics to the layer.

Parameters
graphicsArray of AGSGraphic objects to be added.
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.

Only applicable if AGSFeatureLayer::canCreate, canDeleteFeature:, and canUpdateFeature: permit the edit.

Parameters
addFeaturesThe array of features to add.
updateFeaturesThe array of features to modify.
objectIdsThe object IDs of the features to delete.
Returns
NSOperation that applies the edits.
Since
1.0
See also
- featureLayer:operation:didFeatureEditsWithResults: (AGSFeatureLayerEditingDelegate-p) , method on delegate for success
- featureLayer:operation:didFailFeatureEditsWithError: (AGSFeatureLayerEditingDelegate-p) , method on delegate for error

Provided by category AGSFeatureLayer(Editing).

- (AGSAttachmentManager*) attachmentManagerForFeature: (AGSGraphic *)  feature

Gives a handle to the attachment manager that can download and manage edits to attachments belonging to the specified feature.

Parameters
featurefor which we want the attachment manager
Returns
AGSAttachmentManager
Since
2.0
- (BOOL) callout: (AGSCallout *)  callout
willShowForFeature: (id< AGSFeature >)  feature
layer: (AGSLayer< AGSHitTestable > *)  layer
mapPoint: (AGSPoint *)  mapPoint 

This method is called when a user taps on some features in a layer. Delegates should implement this method when they want to configure how a callout looks for a particular feature in a particular layer. Some properties delegates may want to configure are title, detail, image, customView, etc. The delegate should return YES for the callout to be shown. The delegate can return NO for those features for which a callout should not be shown. If this method is not implemented, AGSCallout::delegate will be consulted instead.

Parameters
calloutThe callout that will show.
featureThe feature to display the callout for.
layerThe layer the feature belongs to.
mapPointThe coordinates at which the graphic callout will be displayed.
Returns
Value indicating whether or not the callout should actually show.
Since
10.2
- (BOOL) canDeleteFeature: (id< AGSFeature >)  feature

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

Parameters
featureCan be nil, in which case, this method is the same as canDelete
Returns
A boolean value
Since
2.3

Reimplemented from <AGSGDBFeatureSourceInfo>.

- (BOOL) canUpdateFeature: (id< AGSFeature >)  feature

Indicates whether the layer allows updates this particular feature. The method first checks canUpdate to verify if the layer is capable of updating any features in general. It also checks ownership-based access control policies of the layer to see if the user specified in the credential has persmissions to edit this specific feature. You should check this property before allowing the ability to update this feature in your app.

Parameters
featureCan be nil, in which case, this method is the same as canUpdate
Returns
A boolean value
Since
2.3

Reimplemented from <AGSGDBFeatureSourceInfo>.

- (void) clearAttachmentManagerForFeatureWithObjectId: (NSInteger)  objectId

Clears the attachment manager that manages attachments for the feature specified by the given objectID. When an attachment manager is cleared, the tempororay files used by the attachment manager to manage attachments is deleted.

Parameters
objectIdof the feature whose attachment manager is to be cleared.
Since
2.0
- (void) clearAttachmentManagers

Clears all the attachment managers that may have been handed out by this feature layer. When an attachment manager is cleared, the tempororay files used by the attachment manager to manage attachments is deleted.

Since
2.0
- (void) clearSelection

Clears the current selection.

Since
1.0

Implements AGSGraphicsLayer.

- (AGSView*) customViewForGraphic: (AGSGraphic *)  graphic
screenPoint: (CGPoint)  screen
mapPoint: (AGSPoint *)  mapPoint 
optionalinherited

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
graphicThe graphic to display the custom view for.
screenThe coordinates at which the graphic callout will be displayed.
mapPointThe coordinates at which the graphic callout will be displayed.
Returns
The custom view to be displayed in the callout.
Deprecated:
Deprecated at 10.2. Use callout:willShowForFeature:layer:mapPoint: (AGSCalloutDelegate-p) or #callout:willShowForFeature:layer:mapPoint: instead.
Since
1.8
- (void) decodeWithJSON: (NSDictionary *)  json
optionalinherited

Decode object from JSON representation.

Parameters
jsonThe JSON representation of the object to be decoded.
Since
1.0
- (int) defaultDpi

The default dpi for the layer.

Since
10.1.1

Provided by category AGSLayer(ForSubclassEyesOnly).

- (NSOperation *) deleteAttachmentsForObjectId: (NSUInteger)  objectId
attachmentIds: (NSArray *)  attachmentIds 

Delete the specified attachments for the specified feature on the server. Only applicable if AGSFeatureLayer::attachments property is true and the feature (to which this attachment belongs) can be edited (canUpdateFeature:).

Parameters
objectIdThe object ID of the feature to which the attachments belong.
attachmentIdsThe attachment IDs of the attachments to be deleted.
Returns
NSOperation that performs the delete.
Since
1.0
See also
- featureLayer:operation:didAttachmentEditsWithResults: (AGSFeatureLayerEditingDelegate-p) , method on delegate for success
- featureLayer:operation:didFailAttachmentEditsWithError: (AGSFeatureLayerEditingDelegate-p) , method on delegate for error

Provided by category AGSFeatureLayer(Editing).

- (NSOperation *) deleteFeaturesWithObjectIds: (NSArray *)  objectIds

Delete features on the server based on the specified OBJECTIDs

Only applicable if canDeleteFeature: is true for each specified feature.

Parameters
objectIdsThe object IDs of the features to delete.
Returns
NSOperation that performs the delete.
Since
1.0
See also
- featureLayer:operation:didFeatureEditsWithResults: (AGSFeatureLayerEditingDelegate-p) , method on delegate for success
- featureLayer:operation:didFailFeatureEditsWithError: (AGSFeatureLayerEditingDelegate-p) , method on delegate for error

Provided by category AGSFeatureLayer(Editing).

- (NSOperation *) deleteFeaturesWithWhereClause: (NSString *)  where
geometry: (AGSGeometry *)  geometry
spatialRelation: (AGSSpatialRelationship spatialRelation 

Deletes features on the server based on the specified query parameters. Only features satisfying all parameters will be deleted.

Only applicable if canDeleteFeature: is true for each feature specified by the parameters.

Parameters
whereThe where clause to restrict the set of candidate features.
geometryThe geometry to be used while testing spatial relationships.
spatialRelationThe spatial relation which should be satisfied between the candidate features and the geometry.
Returns
NSOperation that performs the delete.
Since
1.0
See also
- featureLayer:operation:didFeatureEditsWithResults: (AGSFeatureLayerEditingDelegate-p) , method on delegate for success
- featureLayer:operation:didFailFeatureEditsWithError: (AGSFeatureLayerEditingDelegate-p) , method on delegate for error

Provided by category AGSFeatureLayer(Editing).

- (NSString *) detailForGraphic: (AGSGraphic *)  graphic
screenPoint: (CGPoint)  screen
mapPoint: (AGSPoint *)  mapPoint 
optionalinherited

Detail string to be displayed in the callout.

Parameters
graphicThe graphic to display detail for.
screenThe coordinates at which the graphic callout will be displayed.
mapPointThe coordinates at which the graphic callout will be displayed.
Returns
The detail text for the callout.
Deprecated:
Deprecated at 10.2. Use callout:willShowForFeature:layer:mapPoint: (AGSCalloutDelegate-p) or #callout:willShowForFeature:layer:mapPoint: instead.
Since
1.0
- (NSString*) editSummaryForFeature: (id< AGSFeature >)  feature

Returns a localized string representing the most recent activity on this feature. For example, Created by John Doe 5 hours ago.

Since
2.3

Reimplemented from <AGSGDBFeatureSourceInfo>.

- (NSDictionary *) encodeToJSON
optionalinherited

Encode and return JSON representation for object.

Returns
JSON representation of object.
Since
1.0
+ (id) featureServiceLayerWithURL: (NSURL *)  url
mode: (AGSFeatureLayerMode mode 

A method to get an initialized, autoreleased layer with a URL of an ArcGIS Server Map or Feature Service layer.

Parameters
urlURL to a map or feature service layer.
modeThe mode in which to retrieve features.
Returns
A new, autoreleased, feature layer object.
Since
1.0
See also
- layerDidLoad: (AGSLayerDelegate-p) , method on delegate for success
- layer:didFailToLoadWithError: (AGSLayerDelegate-p) , method on delegate for failure
+ (id) featureServiceLayerWithURL: (NSURL *)  url
mode: (AGSFeatureLayerMode mode
credential: (AGSCredential *)  cred 

A method to get an initialized, autoreleased layer with a URL of an ArcGIS Server Map or Feature Service layer.

Parameters
urlURL to a map or feature service layer.
modeThe mode in which to retrieve features.
credAGSCredential used to access secure resource.
Returns
A new, autoreleased, feature layer object.
Since
1.0
See also
- layerDidLoad: (AGSLayerDelegate-p) , method on delegate for success
- layer:didFailToLoadWithError: (AGSLayerDelegate-p) , method on delegate for failure
- (AGSGraphic *) featureWithTemplate: (AGSFeatureTemplate *)  featureTemplate

Creates a new autoreleased 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
featureTemplateThe feature template to use while creating the feature.
Returns
The new feature.
Since
2.1
See also
- addFeatures: (AGSFeatureLayer(Editing)) or - applyEditsWithFeaturesToAdd:toUpdate:toDelete: (AGSFeatureLayer(Editing)) for committing the feature to the server.

Provided by category AGSFeatureLayer(Editing).

- (AGSGraphic *) featureWithType: (AGSFeatureType *)  featureType

Creates a new autoreleased 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
featureTypeThe type of feature to create.
Returns
The new feature.
Since
2.1
See also
- addFeatures: (AGSFeatureLayer(Editing)) or - applyEditsWithFeaturesToAdd:toUpdate:toDelete: (AGSFeatureLayer(Editing)) for committing the feature to the server.

Provided by category AGSFeatureLayer(Editing).

- (AGSField*) findFieldWithName: (NSString *)  fieldName

Convenience method to find a field with a specified name.

Parameters
fieldNameThe name of the field to find.
Returns
AGSField object with specified name.
Since
1.8
+ (id) graphicsLayer

A method to get an initialized and autoreleased graphics layer.

Returns
A new, autoreleased, graphics layer object.
Since
1.0
- (AGSImage*) imageForGraphic: (AGSGraphic *)  graphic
screenPoint: (CGPoint)  screen
mapPoint: (AGSPoint *)  mapPoint 
optionalinherited

Image to be displayed in the callout to the left of the text. The image will be scaled to 40x40 points.

Parameters
graphicThe graphic to display the image for.
screenThe coordinates at which the graphic callout will be displayed.
mapPointThe coordinates at which the graphic callout will be displayed.
Returns
The image to be displayed in the callout.
Deprecated:
Deprecated at 10.2. Use callout:willShowForFeature:layer:mapPoint: (AGSCalloutDelegate-p) or #callout:willShowForFeature:layer:mapPoint: instead.
Since
1.8
- (id) initWithFullEnvelope: (AGSEnvelope *)  fullEnv

Initializes a graphics layer with a full envelope. If you don't use this, the spatial reference is implied from the contents of the graphics in the layer at the point the graphics layer is added to the map. It's recommended to use this initWithFullEnvelope: or initWithSpatialReference if the AGSGraphicsLayer will be a base-map layer (the first layer added to a map). In this case the full envelope should have it's spatialReference property not nil.

Since
10.1.1
- (id) initWithFullEnvelope: (AGSEnvelope *)  fullEnv
renderingMode: (AGSGraphicsLayerRenderingMode renderingMode 

Initializes an AGSGraphicsLayer with a full envelope and a flag stating whether the layer will rasterize it's graphics. Rasterizing graphics is good when you have a lot of graphics. If you have a small number of graphics you can move them around more efficiently if you set this to NO. The full envelope can be nil, but it should be valid and have a valid spatial reference if this layer will be a base layer in a map.

Since
10.1.1.1
- (id) initWithJSON: (NSDictionary *)  json
optionalinherited

Initialize and return object from JSON representation.

Parameters
jsonThe JSON representation of the object to be created.
Returns
Object decoded from JSON representation.
Since
1.0

Reimplemented in AGSWebMapFeatureCollection.

- (id) initWithLayerDefinitionJSON: (NSDictionary *)  layerDefinitionJSON
featureSet: (AGSFeatureSet *)  featureSet 
Since
2.3
- (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
layerDefinitionJSONJSON representation of this layer's properties. This is the JSON returned by a Map or Feature Service for one of its layers, for example, http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/0?f=pjson It can also be retrieved from an existing feature layer using encodeToJSON (AGSCoding-p)
featureSetJSONJSON representation of an AGSFeatureSet containing the features to be displayed by the layer
Since
1.8
- (id) initWithSpatialReference: (AGSSpatialReference *)  sr

Initializes an AGSGraphicsLayer with a spatial reference. You should use this or initWithFullEnvelope: if you want your layer to be the base layer. This method is helpful if you don't know the full envelope. This method will attempt to pull the defualt full envelope from the spatial reference for initialization purposes.

Since
10.1.1
- (id) initWithURL: (NSURL *)  url
mode: (AGSFeatureLayerMode mode 

Initialize this layer with a URL of an ArcGIS Server Map or Feature Service layer.

Parameters
urlURL to a map or feature service layer.
modeThe mode in which to retrieve features.
Returns
A new feature layer object.
See also
- layerDidLoad: (AGSLayerDelegate-p) , method on delegate for success
- layer:didFailToLoadWithError: (AGSLayerDelegate-p) , method on delegate for failure
Since
1.0
- (id) initWithURL: (NSURL *)  url
mode: (AGSFeatureLayerMode mode
credential: (AGSCredential *)  cred 

Initialize this layer with a URL of an ArcGIS Server Map or Feature Service layer.

Parameters
urlURL to a map or feature service layer.
modeThe mode in which to retrieve features.
credAGSCredential used to access secure resource.
Returns
A new feature layer object.
Since
1.0
See also
- layerDidLoad: (AGSLayerDelegate-p) , method on delegate for success
- layer:didFailToLoadWithError: (AGSLayerDelegate-p) , method on delegate for failure
- (id) initWithURL: (NSURL *)  url
mode: (AGSFeatureLayerMode mode
credential: (AGSCredential *)  cred
error: (NSError **)  error 

Initialize this layer, in a synchronous fashion, with a URL of an ArcGIS Server Map or Feature Service layer. NOTE: The AGSCredentialCache can not be used with synchronous methods.

Parameters
urlURL to a map or feature service layer.
modeThe mode in which to retrieve features.
credAGSCredential used to access secure resource.
errorInformation about the error returned if init fails.
Returns
A new feature layer object.
Since
1.0
See also
- layerDidLoad: (AGSLayerDelegate-p) , method on delegate for success
- layer:didFailToLoadWithError: (AGSLayerDelegate-p) , method on delegate for failure
- (id) initWithURL: (NSURL *)  url
mode: (AGSFeatureLayerMode mode
error: (NSError **)  error 

Initialize this layer, in a synchronous fashion, with a URL of an ArcGIS Server Map or Feature Service layer. NOTE: The AGSCredentialCache can not be used with synchronous methods.

Parameters
urlURL to a map or feature service layer.
modeThe mode in which to retrieve features.
errorInformation about the error returned if init fails.
Returns
A new feature layer object.
Since
1.0
See also
- layerDidLoad: (AGSLayerDelegate-p) , method on delegate for success
- layer:didFailToLoadWithError: (AGSLayerDelegate-p) , method on delegate for failure
- (BOOL) isGraphicSelected: (AGSGraphic *)  graphic

Returns whether a given graphic is selected or not. Graphics with selection enabled will be drawn using selectionSymbol. If selectionSymbol is not specified, then selectionColor will be used to draw a halo around the graphic.

Parameters
graphic
Since
10.1.1
- (BOOL) isInScale

Indicates whether the map's scale is within this layer's scale range (minScale and maxScale).

Since
10.1.1
- (void) layerDidFailToLoad: (NSError *)  error

Subclasses should call this when the layer fails to load. Implementation for this method is provided by the framework.

Since
10.1.1

Provided by category AGSLayer(ForSubclassEyesOnly).

- (void) layerDidLoad

Subclasses should call this when the layer is ready to draw. Implementation for this method is provided by the framework.

Since
10.1.1

Provided by category AGSLayer(ForSubclassEyesOnly).

- (AGSGraphic*) lookupFeatureWithObjectId: (NSInteger)  objectId

A convenience method to lookup a feature in the graphics collection using the specified object id.

Parameters
objectIdThe object ID of the graphic to be looked up.
Returns
AGSGraphic object corresponding to objectId.
Since
1.0
- (void) mapDidUpdate: (AGSMapUpdateType updateType

Method called when the map is updated. You can override this, but make sure to call the super's implementation.

Since
10.1.1

Provided by category AGSLayer(ForSubclassEyesOnly).

- (long long) objectIdForFeature: (id< AGSFeature >)  feature

A convenience method to get the OBJECTID for specified feature.

Parameters
featureThe feature to get OBJECTID for.
Returns
The OBJECTID for feature.
Since
1.0

Reimplemented from <AGSGDBFeatureSourceInfo>.

- (NSOperation *) queryAttachmentInfosForObjectId: (NSUInteger)  objectId

Get information about all attachments that belong to the specified feature.

Parameters
objectIdThe object ID of the feature.
Returns
NSOperation that performs the query.
Since
1.0
See also
- featureLayer:operation:didQueryAttachmentInfosWithResults: (AGSFeatureLayerEditingDelegate-p) , method on delegate for success
- featureLayer:operation:didFailQueryAttachmentInfosWithError: (AGSFeatureLayerEditingDelegate-p) , method on delegate for error

Provided by category AGSFeatureLayer(Editing).

- (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
querySpecifies the criteria for the query.
Returns
The operation performing the query.
Since
1.8
See also
- featureLayer:operation:didQueryFeatureCountWithResult: (AGSFeatureLayerQueryDelegate-p) , method on queryDelegate for success
- featureLayer:operation:didFailQueryFeatureCountWithError: (AGSFeatureLayerQueryDelegate-p) , method on queryDelegate for failure
- (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
querySpecifies the criteria for the query.
Returns
The operation performing the query.
Since
1.0
See also
- featureLayer:operation:didQueryFeaturesWithFeatureSet: (AGSFeatureLayerQueryDelegate-p) , method on queryDelegate for success
- featureLayer:operation:didFailQueryFeaturesWithError: (AGSFeatureLayerQueryDelegate-p) , method on queryDelegate for failure
- (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
querySpecifies the criteria for the query.
Returns
The operation performing the query.
Since
1.0
See also
- featureLayer:operation:didQueryObjectIdsWithResults: (AGSFeatureLayerQueryDelegate-p) , method on queryDelegate for success
- featureLayer:operation:didFailQueryObjectIdsWithError: (AGSFeatureLayerQueryDelegate-p) , method on queryDelegate for failure
- (NSOperation*) queryRelatedFeatures: (AGSRelationshipQuery *)  query

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
querySpecifies the criteria for the query.
Returns
The operation performing the query.
Since
1.0
See also
- featureLayer:operation:didQueryRelatedFeaturesWithResults: (AGSFeatureLayerQueryDelegate-p) , method on queryDelegate for success
- featureLayer:operation:didFailQueryRelatedFeaturesWithError: (AGSFeatureLayerQueryDelegate-p) , method on queryDelegate for failure
- (void) refresh

Requeries for the features in the feature layer. The feature layer requeries the features in the service, according to it's mode, and updates itself.

Since
10.1.1

Implements AGSGraphicsLayer.

- (void) removeAllGraphics

Remove all graphics from the layer. the layer.

Since
1.0
- (void) removeGraphic: (AGSGraphic *)  graphic

Remove graphic from the graphics collection. redraw the layer.

Parameters
graphicThe graphic to be removed.
Since
1.0
- (void) removeGraphics: (NSArray *)  objects

Removes a set of graphics from the layer.

- (void) resubmit

If the layer failed to load with a specific url and credential, you can resubmit it to try and load again using the same url and credential. If you want to modify the credential, you can update the credential on the layer before calling this method. If you also want to update the url, you should use # resubmitWithURL:credential: instead.

This function does nothing if the layer is already loaded. This function also does nothing if the layer is currently trying to load.

Since
10.1.1
- (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
urlURL to the feature service.
credAGSCredential used to access the secured resource.
Since
1.0
- (NSOperation *) retrieveAttachmentForObjectId: (NSUInteger)  objectId
attachmentId: (NSInteger)  attachmentId 

Fetch the contents of the specified attachment.

Parameters
objectIdThe object ID of the feature to which the attachment belongs.
attachmentIdThe ID of the attachment to fetch.
Returns
NSOperation that performs the retrieval.
Since
1.0.
See also
- featureLayer:operation:didRetrieveAttachmentWithData: (AGSFeatureLayerEditingDelegate-p) , method on delegate for success
AGSFeatureLayerEditingDelegate# featureLayer:operation:didFailRetrieveAttachmentWithError: , method on delegate for error

Provided by category AGSFeatureLayer(Editing).

- (NSArray*) selectedGraphics

An array of AGSGraphic objects representing graphics that have selection enabled Graphics with selection enabled will be drawn using selectionSymbol. If selectionSymbol is not specified, then selectionColor will be used to draw a halo around the graphic.

Since
10.1.1
- (void) selectFeature: (AGSGraphic *)  feature
withSelectionMethod: (AGSFeatureLayerSelectionMethod selectionMethod 

Selects a feature with the method specified. The feature must exist in the feature layer graphics collection.

Parameters
featureThe feature that you want apply the selection method to
selectionMethodWhether you want to add to, delete from, or entirely replace the existing set of selected features
Since
1.8
Deprecated:
Deprecated at 10.1.1. Use setSelected:forGraphic: (AGSGraphicsLayer) instead.
- (NSOperation*) selectFeaturesWithQuery: (AGSQuery *)  query
selectionMethod: (AGSFeatureLayerSelectionMethod selectionMethod 

Selects features based on the specified query. Selected features are symbolized using selectionSymbol if available, otherwise using the layer's renderer along with a surrounding halo of selectionColor.

The queryDelegate will be notified when the operation completes or if an error is encountered.

Parameters
querySpecifies the criteria for the query.
selectionMethodSpecifies 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
- featureLayer:operation:didSelectFeaturesWithFeatureSet: (AGSFeatureLayerQueryDelegate-p) , method on queryDelegate for success
- featureLayer:operation:didFailSelectFeaturesWithError: (AGSFeatureLayerQueryDelegate-p) , method on queryDelegate for failure
AGSGraphicsLayer::selectedFeatures for a list of currently selected features
selectionColor selectionSymbol for changing how selected features are displayed
- clearSelection to clear selection
- (void) setSelected: (BOOL)  selected
forGraphic: (AGSGraphic *)  graphic 

Selects or un-selects the graphic. Graphics with selection enabled will be drawn using selectionSymbol. If selectionSymbol is not specified, then selectionColor will be used to draw a halo around the graphic.

Parameters
selectedIf YES, graphic will be selected. Else it will be un-selected
graphic
Since
10.1.1
See also
selectionColor selectionSymbol for changing how selected graphics are displayed
- clearSelection to clear selection
- (void) spatialReferenceStatusInitialized

Called when the status of the layer's spatial reference has been established. You can override this method, just make sure to call the super's implementation.

Since
10.1.1

Provided by category AGSLayer(ForSubclassEyesOnly).

- (AGSFeatureTemplate *) templateForFeature: (AGSGraphic *)  feature
type: (AGSFeatureType **)  type 

Convenience method to find the feature template associated with a particular feature.

Parameters
featureThe feature to find the template for.
typeThe 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 *)  mapPoint 
optionalinherited

Title text to be displayed in the callout.

Parameters
graphicThe graphic to display a title for.
screenThe coordinates at which the graphic callout will be displayed.
mapPointThe coordinates at which the graphic callout will be displayed.
Returns
The title text for the callout.
Deprecated:
Deprecated at 10.2. Use callout:willShowForFeature:layer:mapPoint: (AGSCalloutDelegate-p) or #callout:willShowForFeature:layer:mapPoint: instead.
Since
1.0
- (NSOperation *) updateAttachment: (NSUInteger)  objectId
data: (NSData *)  data
filename: (NSString *)  filename
attachmentId: (NSInteger)  attachmentId 

Update the specified attachment of the specified feature on the server using the provided attachment. Only applicable if AGSFeatureLayer::attachments property is true and the feature (to which this attachment belongs) can be edited (canUpdateFeature:).

Parameters
objectIdThe object ID of the feature to which the attachment belongs.
dataThe raw contents of the new attachment.
filenameThe name for the new attachment.
attachmentIdThe attachment ID of the old attachment that the new attachment will replace.
Returns
NSOperation that performs the update.
Since
1.0
See also
- featureLayer:operation:didAttachmentEditsWithResults: (AGSFeatureLayerEditingDelegate-p) , method on delegate for success
- featureLayer:operation:didFailAttachmentEditsWithError: (AGSFeatureLayerEditingDelegate-p) , method on delegate for error

Provided by category AGSFeatureLayer(Editing).

- (NSOperation *) updateAttachment: (NSUInteger)  objectId
data: (NSData *)  data
filename: (NSString *)  filename
contentType: (NSString *)  contentType
attachmentId: (NSInteger)  attachmentId 

Update the specified attachment of the specified feature on the server using the provided attachment. Only applicable if AGSFeatureLayer::attachments property is true and the feature (to which this attachment belongs) can be edited (canUpdateFeature:).

Parameters
objectIdThe object ID of the feature to which the attachment belongs.
dataThe raw contents of the new attachment.
filenameThe name for the new attachment.
contentTypeThe content type of the attachment. If nil is passed, the api will try to match a content type to known file extensions.
attachmentIdThe attachment ID of the old attachment that the new attachment will replace.
Returns
NSOperation that performs the update.
Since
1.0
See also
- featureLayer:operation:didAttachmentEditsWithResults: (AGSFeatureLayerEditingDelegate-p) , method on delegate for success
- featureLayer:operation:didFailAttachmentEditsWithError: (AGSFeatureLayerEditingDelegate-p) , method on delegate for error

Provided by category AGSFeatureLayer(Editing).

- (NSOperation *) updateFeatures: (NSArray *)  features

Commits changes made to the specified features to the server.

Only applicable if canUpdateFeature: is true for each of the specified featrues

Parameters
featuresThe features to update.
Returns
NSOperation that performs the update.
Since
1.0
See also
- featureLayer:operation:didFeatureEditsWithResults: (AGSFeatureLayerEditingDelegate-p) , method on delegate for success
- featureLayer:operation:didFailFeatureEditsWithError: (AGSFeatureLayerEditingDelegate-p) , method on delegate for error

Provided by category AGSFeatureLayer(Editing).

Property Documentation

- (BOOL) advancedSymbols
readwritenonatomicassign

Indicates whether the layer should use advanced symbols from the service. The default is NO. Servers which don't support this simply ignore the parameter and return regular symbols instead.

Availability:
This feature is only available with services from ArcGIS Server 10.1 or above

Since
10.2.2
- (BOOL) allowCallout
readwritenonatomicassigninherited

Property that determines if the layer allows callouts to be shown for its features.

Since
10.2
- (BOOL) allowHitTest
readwritenonatomicassigninherited

Property that determines if the layer allows it to be hit tested or if it is bypassed.

Since
10.2
- (BOOL) allowLayerConsolidation
readwritenonatomicassigninherited

Specifies whether the layer can be consolidated with other layers for saving memory.

Since
10.1.1.1
- (BOOL) attachments
readnonatomicassign

If YES, features in the layer may have attachments. Developers should call queryAttachmentInfosForObjectId: (AGSFeatureLayer(Editing)) for each feature to see if it has any attachments.

Since
1.0
- (BOOL) autoRefreshOnExpiration
readwritenonatomicassign

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
10.1.1
- (CGFloat) bufferFactor
readwritenonatomicassign

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 up to 10. If it is set to 0, every time the map extent is changed a refresh with requery will take place in OnDemand mode. If the buffer factor is less than 0, then the layer will never requery from an extent change. This is not usually recommended.

Since
1.0
- (id<AGSLayerCalloutDelegate>) calloutDelegate
readwritenonatomicweakinherited

Delegate that allows the layer to react to when a callout is shown for one of it's features.

Since
10.2
- (BOOL) canCreate
readnonatomicassign

Indicates whether the layer allows new features to be created. You should check this property before allowing the ability to create a new feature in your app.

Since
2.3
- (BOOL) canDelete
readnonatomicassign

Indicates whether the layer allows features to be deleted. It is preferable to use canDeleteFeature: instead because this property does not take into account any ownership-based access control policies for the specific feature you are trying to delete. It only provides general information about whether the layer is capable of allowing feature deletions at all.

Since
2.3
See also
- canDeleteFeature:
- (BOOL) canUpdate
readnonatomicassign

Indicates whether the layer allows a feature to be updated. It is preferable to use canUpdateFeature: instead because this property does not take into account any ownership-based access control policies for the specific feature you are trying to edit. It only provides general information about whether the layer is capable of allowing feature updates at all.

Since
2.3
- (BOOL) canUpdateGeometry
readnonatomicassign

Indicates whether the layer allows geometries of features to be updated. You should check this property before allowing the ability to update a feature's geometry in your app.

Since
2.3
- (CGFloat) constraintFactor
readwritenonatomicassign

Constraint factor is used when the feature layer is in OnDemand mode. This property defines refresh with requery behavior for OnDemand mode when the user is zooming in. This property should be set to a fraction between 0 and 1. If the size of the envelope the user zooms in to is less than that specified fraction of the buffered envelope's size then a requery will happen. For example: the constraintFactor is set to .1 (one-tenth), we have a buffered envelope of features that is 50 miles wide. The user zooms in to an envelope that is 4 miles wide. Since the envelope the layer needs to draw is less than one-tenth the size of the buffered envelope, the feature layer will requery, even though the zoomed-to envelope is contained within the buffered envelope. This is useful if you have a service with a number of features that exceeds the ArcGIS server query limit and you want the layer to requery when the user zooms in by a certain amount. A value of 0 or less will never requery when the user zooms in within the buffered envelope. A value of 1 will always requery when the user zooms in within the buffered envelope. The default value is .1f (one-tenth).

Since
2.1
- (AGSCredential*) credential
readwritenonatomiccopy

The credential to be used to access secured resources.

Since
1.0
- (AGSCredentialCache*) credentialCache
readwritenonatomicstrong

The credential cache to be used for this resource. By default this will be set to the global cache.

Since
10.1.1
- (NSString*) defaultDefinitionExpression
readnonatomiccopy

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
readwritenonatomiccopy

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
- (id<AGSLayerDelegate>) delegate
readwritenonatomicweakinherited

Delegate to be notified when the layer is loaded or fails to load.

Since
1.0
- (NSString*) displayField
readnonatomiccopy

The primary display field as defined by the service.

Since
1.0
- (AGSEditFieldsInfo*) editFieldsInfo
readnonatomicstrong

Metadata regarding which fields or attributes of a feature contain information about who created/edited the feature and when was it created/edited.

Since
2.3
- (id<AGSFeatureLayerEditingDelegate>) editingDelegate
readwritenonatomicweak

Delegate to be notified when editing operations complete successfully or encounter an error.

Since
1.0
- (NSString*) endTimeField
readwritenonatomiccopyinherited

The name of the attribute that contains ending time information of a graphic. Only applicable if graphics contain temporal information.

Since
10.1.1
- (NSError*) error
readnonatomicstronginherited

Information about the error associated with a layer.

Since
1.0

Provided by category AGSLayer(ForSubclassEyesOnly).

- (double) expirationInterval
readwritenonatomicassign

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
- (NSArray*) fields
readnonatomiccopy

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
readnonatomicstronginherited

Full extent of the layer.

Since
1.0
- (AGSGeometryType) geometryType
readnonatomicassign

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
- (NSArray*) graphics
readnonatomiccopyinherited

The array of AGSGraphic objects that need to be displayed on the map. This property returns a thread-safe copy.

Since
1.0
- (NSUInteger) graphicsCount
readnonatomicassigninherited

If you simply need the count of the graphics, you can access it through this property instead of using the graphics property which has the overhead of creating a copy.

Since
10.1.1
- (BOOL) hasVersionedData
readnonatomicassign

Indicates whether the data backing the layer is versioned.

Availability:
This feature is only available with services from ArcGIS Server 10.1 or above

Since
10.2.5
- (id<AGSInfoTemplateDelegate>) infoTemplateDelegate
readwritenonatomicweak

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.

Deprecated:
Deprecated at 10.2. Use AGSHitTestable::calloutDelegate instead.
Since
1.0
- (AGSEnvelope*) initialEnvelope
readwritenonatomicstronginherited

Gets or sets the initial envelope of the layer.

Since
1.0
- (BOOL) isTableOnly
readnonatomicassigninherited

If YES, the source contains non-geographic data.

Since
10.2
- (NSArray*) labelingInfo
readnonatomiccopy

An array of AGSLabelClass objects representing labeling information.

Since
1.8
- (NSString*) layerDescription
readnonatomiccopy

The description of the layer as defined by the service.

Since
1.0
- (NSUInteger) layerId
readnonatomicassign

The ID of the layer as defined by the service.

Since
1.0
- (BOOL) loaded
readnonatomicassigninherited

Indicates that this layer loaded successfully.

Since
1.0
- (AGSMapView*) mapView
readwritenonatomicweakinherited

The map that the layer is in.

Since
10.1.1

Provided by category AGSLayer(ForSubclassEyesOnly).

- (double) maxAllowableOffset
readwritenonatomicassign

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
readwritenonatomicassigninherited

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
- (double) minScale
readwritenonatomicassigninherited

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
- (AGSFeatureLayerMode) mode
readnonatomicassign

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
readwritenonatomiccopyinherited

The name of this layer

Since
10.1.1
- (NSString*) objectIdField
readnonatomiccopy

The name of field which contains the OBJECTID.

Since
1.0
See also
- objectIdForFeature: to conveniently get a feature's OBJECTID.
- (CGFloat) opacity
readwritenonatomicassigninherited

The opacity of this layer as a value between 0(fully transparent) and 1(fully opaque)

Since
10.1.1
- (NSArray*) outFields
readwritenonatomiccopy

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
readnonatomicassign

Specifies whether or not the layer is queryable. If the layer is not queryable, it will not be displayed.

Since
1.0
- (id<AGSFeatureLayerQueryDelegate>) queryDelegate
readwritenonatomicweak

Delegate to be notified when query operations complete successfully or encounter an error.

Since
1.0
- (NSArray*) relationships
readnonatomiccopy

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
readwritenonatomicstronginherited

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
- (AGSGraphicsLayerRenderingMode) renderingMode
readnonatomicassigninherited

The rendering mode for this graphics layer.

Since
10.1.1.1
- (BOOL) renderNativeResolution
readwritenonatomicassigninherited

Gets a value that determines if the layer renders at the native resolution. This property will not have any affect on iOS devices without a retina display. If using an iOS device with a retina display and you want to take advantage of that display you can set this value to YES. If YES, this layer will use more memory and network bandwidth, but the layer will render at a higher resolution. This property is not settable for every layer type.

Since
2.1
- (NSURLRequestCachePolicy) requestCachePolicy
readwritenonatomicassign

The cache policy that should be used for making the web request. Default value is NSURLRequestUseProtocolCachePolicy

Since
10.1.1
- (AGSColor*) selectionColor
readwritenonatomiccopyinherited

The color to use for drawing a halo around selected graphics. Default is cyan. Only used if selectionSymbol is not specified.

Since
10.1.1
- (AGSSymbol*) selectionSymbol
readwritenonatomicstronginherited

The symbol to use for drawing selected graphics. If this is not specified, selectionColor is used.

Since
10.1.1
See also
selectionColor
- (AGSEnvelope*) serviceFullEnvelope
readnonatomicstrong

The full envelope of the service. In the service's native spatial reference.

Since
1.8
- (NSString*) serviceLayerName
readnonatomiccopy

The name of the layer as defined by the service.

Since
1.8
- (AGSSpatialReference*) spatialReference
readnonatomicstronginherited

The spatial reference of the layer.

Since
1.0
- (BOOL) spatialReferenceStatusValid
readwritenonatomicassigninherited

This property will be NO until the spatial reference status has been initialized. See the layer:didInitializeSpatialReferenceStatus method on delegate for more information.

- (NSString*) startTimeField
readwritenonatomiccopyinherited

The name of the attribute that contains starting time information of a graphic. Only applicable if graphics contain temporal information.

Since
10.1.1
- (NSArray*) templates
readnonatomiccopy

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
readnonatomicassigninherited

A property indicating whether the layer is time-aware.

Since
1.0
- (AGSTimeExtent*) timeDefinition
readwritenonatomicstrong

A time definition is similar to a definitionExpression in that it limits the features displayed by this layer based on some contraints. A time definition 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
- (AGSTimeInfo*) timeInfo
readnonatomicstrong

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
- (double) timeOffset
readwritenonatomicassigninherited

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
10.1.1
- (AGSTimeIntervalUnits) timeOffsetUnits
readwritenonatomicassigninherited

Units of the amount specified by timeOffset. Refer to AGSTimeIntervalUnits for possible values.

Since
10.1.1
- (NSTimeInterval) timeoutInterval
readwritenonatomicassign

The timeout interval (in seconds) for this request. Default value is 60.

Since
10.1.1
- (NSString*) type
readnonatomiccopy

The type of the layer as defined by the service. Could be either Feature Layer or Table.

Since
1.0
- (NSString*) typeIdField
readnonatomiccopy

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
readnonatomiccopy

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
- (NSURL*) URL
readnonatomiccopy

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
- (CGFloat) version
readnonatomicassign

The version of the service.

Since
1.8
- (BOOL) visible
readwritenonatomicassigninherited

Indicates whether this layer should be visible in the map.

Since
10.1.1