Problem with FeatureLayer

12-01-2011 01:37 PM
New Contributor
I have problem with FeatureLayer.(same as here:

I implemented this:
NSURL* url = [NSURL URLWithString:@"...FeatureServer/0"];  
    AGSFeatureLayer* featureLayer = [[AGSFeatureLayer alloc]initWithURL:url mode:AGSFeatureLayerModeSnapshot];

NSMutableArray *grap=[[NSMutableArray alloc]init];;

And grap.count is 0. What is the problem?  Mess up anything?

Thanks for the answer!
0 Kudos
1 Reply
New Contributor
I have the answer:)

You must init with this method:
- (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.
@param url URL to a map or feature service layer.
@param mode The mode in which to retrieve features.
@param cred <code>AGSCredential</code> used to access secure resource.
@param error Information about the error returned if init fails.
@return A new feature layer object.
@since 1.0
0 Kudos