Feature Layer Editing

1018
6
Jump to solution
09-17-2012 11:14 AM
VIKRANTKRISHNA
New Contributor III
The Feature Layer Editing sample shows editing of layers from the webmap. How can do the editing (adding/deletingattributes) in the popup for the layers which are not part of arcgis.com webmap. Specifically, the statement in the method didClickCalloutAccessoryButtonForGraphic()

self.popupVC = [[[AGSpopupsContanerViewController alloc] initWithWebMap:self.webmap forFeature:graphic usingNavigationControllerStsck:NO autorelese];


what do I pass instead of initWithWebMap
0 Kudos
1 Solution

Accepted Solutions
NimeshJarecha
Esri Regular Contributor
You should use NSMutableArray to store your features (one by one) and when you are done with adding all the features, you should use AGSFeatureSet's featureSetWithFeatures to create a feature set and pass the array of features.

Hope this helps!

Regards,
Nimesh

View solution in original post

0 Kudos
6 Replies
NimeshJarecha
Esri Regular Contributor
You should do it like this...

AGSPopupInfo *popupInfo = [AGSPopupInfo popupInfoForGraphic:graphic];
AGSPopup *popup = [AGSPopup popupWithGraphic:graphic popupInfo:popupInfo];
self.popupVC = [[[AGSPopupsContainerViewController alloc]initWithPopups:[NSArray arrayWithObject:popup]]autorelease];

Regards,
Nimesh
0 Kudos
VIKRANTKRISHNA
New Contributor III
You should do it like this...

AGSPopupInfo *popupInfo = [AGSPopupInfo popupInfoForGraphic:graphic];
AGSPopup *popup = [AGSPopup popupWithGraphic:graphic popupInfo:popupInfo];
self.popupVC = [[[AGSPopupsContainerViewController alloc]initWithPopups:[NSArray arrayWithObject:popup]]autorelease];

Regards,
Nimesh


Thanks!! that works.
Also is it possible to edit a table in the feature service (not related table)?. I need to add records to a table in the feature service based on selection on the map.
0 Kudos
NimeshJarecha
Esri Regular Contributor
Great! Yes, you can add records to the table.

Regards,
Nimesh
0 Kudos
NimeshJarecha
Esri Regular Contributor
If you are satisfied with answer then please mark thread as answered.

Regards,
Nimesh
0 Kudos
VIKRANTKRISHNA
New Contributor III
Hi Nimesh,
              I have one more question added to this table editing. I am looping through the query results and then creating a new features for table editing (attribute only, no geometry) from query each feature. Then I want to add this new feature one at a time to empty featureSet, how can I do that. I couldn't find a way to add new features to empty featureSet.

Really appreciate help on this.

Thanks,
Vikrant


If you are satisfied with answer then please mark thread as answered.

Regards,
Nimesh
0 Kudos
NimeshJarecha
Esri Regular Contributor
You should use NSMutableArray to store your features (one by one) and when you are done with adding all the features, you should use AGSFeatureSet's featureSetWithFeatures to create a feature set and pass the array of features.

Hope this helps!

Regards,
Nimesh
0 Kudos