Select to view content in your preferred language

Feature Layer Attachments

820
1
Jump to solution
11-13-2012 11:19 AM
VIKRANTKRISHNA
Regular Contributor
I am following the documentation for attachment manager for the feature layer. In my case layer is the table in feature service.

What I am doing is
 int fid = 27242 AGSGraphic* feature = [featureLayer lookupFeatureWithObjectId:fid];  NSLog("%@",feature);  AGSAttachmentManager* attMgr = [featureLayer attachmentManagerForFeature: feature];  [attMgr addAttachmentAsJpgWithImage:image name:@"My House"];  


What is am getting in NSLog is null , even though there is a feature in the layer with ObjectId 27242.

Is there something I am doing wrong?

Thanks,
Vikrant
0 Kudos
1 Solution

Accepted Solutions
NimeshJarecha
Esri Regular Contributor
lookupFeatureWithObjectId will return feature only if it's available in graphics array of feature layer. Is that the case? If not, you must send query to get all the features from server and then go ahead from there.

Regards,
Nimesh

View solution in original post

0 Kudos
1 Reply
NimeshJarecha
Esri Regular Contributor
lookupFeatureWithObjectId will return feature only if it's available in graphics array of feature layer. Is that the case? If not, you must send query to get all the features from server and then go ahead from there.

Regards,
Nimesh
0 Kudos