Select to view content in your preferred language

Feature Fields not editable in the AGSPopupInfo popup

1735
10
12-15-2011 05:32 AM
SeanTucker1
Deactivated User
Question
- What Configuration of, Feature Service or code, allows Feature Fields to be editable in  AGSPopupInfo popup?

Problem
- Feature Fields do not show up in the AGSPopupInfo popup for editing.

Details
- the self.popupInfo.fieldInfos value shows up empty in the following code.
(void)mapView:(AGSMapView *)mapView didClickCalloutAccessoryButtonForGraphic:(AGSGraphic *)graphic
{
   
    //create a popup info object
    self.popupInfo = [AGSPopupInfo popupInfoForGraphic:graphic];
   
    //disable deleting and geometry editing
    self.popupInfo.allowDelete = NO;
    self.popupInfo.allowEditGeometry = NO;
   
    //create the popup container
    self.popupVC = [[[AGSPopupsContainerViewController alloc]initWithPopupInfo:self.popupInfo graphic:self.newFeature usingNavigationControllerStack:YES]autorelease];
    self.popupVC.delegate = self;
   
    //push the popup controller onto the navigation stack
    [self.navigationController pushViewController:self.popupVC animated:YES];

    //start editing mode
    [self.popupVC startEditingCurrentPopup];
   
}
0 Kudos
10 Replies
NimeshJarecha
Esri Regular Contributor
Just set the outFields of the feature layers before adding them to map and it should work. Like below...

    //add feature layers
    AGSFeatureLayer *trailsLayer = [AGSFeatureLayer featureServiceLayerWithURL:[NSURL URLWithString:trailsURL] mode:AGSFeatureLayerModeOnDemand];
    trailsLayer.outFields = [NSArray arrayWithObject:@"*"]; //added
    [self.mapView addMapLayer:trailsLayer withName:@"Trails"];

Regards,
Nimesh
0 Kudos