elueders

Edit / Add Features with an offline Geodatabase doesn't work

Discussion created by elueders on Mar 6, 2014
Latest reply on Apr 6, 2014 by teamigal
Hi,

I'm currently stuck with the implementation of an offline map.
My software uses an offline .geodatabase file to display features on the map.
To do so it reads the tables from the database and adds them to as a layer to the map:
[self.mapView addMapLayer:[[AGSFeatureTableLayer alloc] initWithFeatureTable:fTable]];


Now I had a look at the OfflineFeatureEditing sample code and added the source for adding new features in my application.
So far viewing the popups is fine but I am not able to edit the data. This is how I create the popup with the desired data from the featuretemplate:

AGSGDBFeatureTable* fTable = (AGSGDBFeatureTable*)layer;
AGSGDBFeature* feature = [fTable featureWithTemplate:featureTemplate];
AGSPopupInfo *pi = [AGSPopupInfo popupInfoForGDBFeatureTable:fTable];
AGSPopup *p = [[AGSPopup alloc] initWithGDBFeature:feature popupInfo:pi];
        
self.popupsVC = [[AGSPopupsContainerViewController alloc] initWithPopups:@[p] usingNavigationControllerStack:NO];
_popupsVC.delegate = self;
        
_popupsVC.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentViewController:_popupsVC animated:YES completion:nil];

[_popupsVC startEditingCurrentPopup];


No matter what I tried (startEditionCurrentPopup, setEditing:animated:, ...) the popup viewcontrollers property "inEditingMode" is always false.

Anyone has an idea please?

Outcomes