AnsweredAssumed Answered

No features visible using AGSServiceFeatureTable and AGSFeatureLayer

Question asked by aaourz on Jan 29, 2018
Latest reply on Feb 5, 2018 by aaourz

Hi,

 

I'm trying to display a feature layer using a feature table, so I can identify the features when clicked on.

This is my code:

 

AGSCredential *cred = [[AGSCredential alloc] initWithUser:@"..." password:@"..."];

AGSServiceFeatureTable *featureTable = [AGSServiceFeatureTable serviceFeatureTableWithURL:[NSURL URLWithString:@"https://arcgis.../MapServer"]];

featureTable.credential = cred;

AGSFeatureLayer *featureLayer = [[AGSFeatureLayer alloc] initWithFeatureTable:featureTable];

[map.operationalLayers addObject:featureLayer];

 

Is there anything wrong with this code?

 

I also tried AGSArcGISMapImageLayer as an alternative (which works), but the features can't be identified with this method.

 

Any help is appreciated!

Outcomes