Select to view content in your preferred language

Feature Fields not editable in the AGSPopupInfo popup

1725
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
Let me ask few questions to narrow down the issue...

1. Is this a new graphic created or an existing graphic on the map?
2. Is this graphic belong to a feature layer?
3. Is this feature layer editable?
4. You are creating a popupInfo for 'graphic' in following code line...
self.popupInfo = [AGSPopupInfo popupInfoForGraphic:graphic];

but creating a popupVC for self.newFeature. Why?

self.popupVC = [[[AGSPopupsContainerViewController alloc]initWithPopupInfo:self.popupInfo graphic:self.newFeature usingNavigationControllerStack:YES]autorelease];

Are you missing a code line? self.newFeature = graphic?

Regards,
Nimesh
0 Kudos
SeanTucker1
Deactivated User
Answers
1. New graphic
2. Yes the graphic belongs to a feature layer
3. The Feature Layer is Editable
    - Feature Access "Editing" selected in AGS Manager
4. Code should read "graphic" .. "graphic" ..
    I was trying "self.newFeature" .. "self.newFeature" first .. that did not work.
    It reads all "graphic". Either way does not work.

Thanks
Sean.

Let me ask few questions to narrow down the issue...

1. Is this a new graphic created or an existing graphic on the map?
2. Is this graphic belong to a feature layer?
3. Is this feature layer editable?
4. You are creating a popupInfo for 'graphic' in following code line...
self.popupInfo = [AGSPopupInfo popupInfoForGraphic:graphic];

but creating a popupVC for self.newFeature. Why?

self.popupVC = [[[AGSPopupsContainerViewController alloc]initWithPopupInfo:self.popupInfo graphic:self.newFeature usingNavigationControllerStack:YES]autorelease];

Are you missing a code line? self.newFeature = graphic?

Regards,
Nimesh
0 Kudos
NimeshJarecha
Esri Regular Contributor
Since, it's a new feature, you MUST add it to the feature layer before creating a popupInfo. Are doing that?

[self.featureLayer addGraphic:graphic];

Regards,
Nimesh
0 Kudos
SeanTucker1
Deactivated User
Answer(s)
Yes - it is added to the feature layer before creating the popupInfo.


Thanks
Sean.

Since, it's a new feature, you MUST add it to the feature layer before creating a popupInfo. Are doing that?

[self.featureLayer addGraphic:graphic];

Regards,
Nimesh
0 Kudos
NimeshJarecha
Esri Regular Contributor
If possible, can you please share your sample application so I can test it?

Regards,
Nimesh
0 Kudos
SeanTucker1
Deactivated User
How do I do that?
0 Kudos
NimeshJarecha
Esri Regular Contributor
You can add attachment to the post here.

Regards,
Nimesh
0 Kudos
SeanTucker1
Deactivated User
Intranet AGS Server.

But if you test code against a working service on your side, let me know.
For your code .. Update
-incidentURL
-incidentLayer
0 Kudos
SeanTucker1
Deactivated User
See attached.

You will have to update
- "incidentURL"
0 Kudos