vmachuca-img-com-br-esridist

Problems to Add Features in AGSFeatureLayerEditingDelegate

Discussion created by vmachuca-img-com-br-esridist on Aug 30, 2012
Latest reply on Feb 2, 2015 by HrishiPol
I need add geometry to Feature Service, but not working. :(

My flow is:

1. Adopt AGSFeatureLayerEditingDelegate delegate.

2. AGSFeatureLayer *featureLayer = [AGSFeatureLayer featureServiceLayerWithURL: urlFeatureLayer mode: AGSFeatureLayerModeOnDemand];

3. featureLayer.editingDelegate = self;

4.     NSMutableDictionary *graphicAttributes = [[NSMutableDictionary alloc] init];
[graphicAttributes setObject:@"EXAMPLE1" forKey:@"FIELD1"];
[graphicAttributes setObject:@"EXAMPLE2" forKey:@"FIELD2"];
   
5. AGSGraphic *graphic = [AGSGraphic graphicWithGeometry:selectedMaPoint symbol:nil attributes:graphicAttributes infoTemplateDelegate:self];
       
6. [featureLayer addFeatures:[NSArray arrayWithObject:graphic]];


The strange thing is that no delegate is called!

Ex:
- (void)featureLayer:(AGSFeatureLayer *)featureLayer operation:(NSOperation*)op didFeatureEditsWithResults:(AGSFeatureLayerEditResults *)editResults;

- (void)featureLayer:(AGSFeatureLayer *)featureLayer operation:(NSOperation*)op didFailFeatureEditsWithError:(NSError *)error;


Thanks!

Outcomes