Identify & mapView:didClickCalloutAccessoryButtonForGraphic

Discussion created by jpapirti on Aug 3, 2010
Latest reply on Aug 6, 2010 by harikant_jammi
Has anyone figured out the proper way to set up a table push with attributes after performing an Identify Task?

I have been able to do this with AGSQueryTask, but would like to know how I can acheive this using the Identify Task. 

My code reads as follows:

//when a user clicks the detail disclosure button on the call out
-(void)mapView:(AGSMapView *)mapView didClickCalloutAccessoryButtonForGraphic:(AGSGraphic *)graphic {

//lazily create the view for the feature details
    FeatureDetailsController *featureDetailViewController = [[FeatureDetailsController alloc] initWithNibName:@"FeaturesDetailViewController"
if ([identifyPicker selectedRowInComponent:0] == 0){
    //give feature info to details view and push on to stack (i.e. make it visible)
featureDetailViewController.feature = graphic;
featureDetailViewController.displayFieldName = @"wellname";
    [self.navigationController pushViewController:featureDetailViewController animated:YES];
    [featureDetailViewController release];
//Creates the Graphics when an Item is selected.
- (void)identifyTask:(AGSIdentifyTask *)identifyTask operation:(NSOperation *)op didExecuteWithIdentifyResults:(NSArray *)results {

if ([identifyPicker selectedRowInComponent:0] == 0){
//Turn off network activity indicator
    [AGSMapView showNetworkActivityIndicator:FALSE];

    //clear previous results
    [self.graphicsLayer removeAllGraphics];
  wellViewInfoTemplate *wellTemplate =[[wellViewInfoTemplate alloc] init];

    //add new results

  AGSSymbol* symbol = [AGSSimpleMarkerSymbol simpleMarkerSymbol];
  symbol.color = [UIColor colorWithRed:0 green:0 blue:1 alpha:0.5];
  for (AGSIdentifyResult* result in results) {
   result.feature.symbol = symbol;
   result.feature.infoTemplate = wellTemplate;
   [self.graphicsLayer addGraphic:result.feature];
  [self.graphicsLayer dataChanged];

featureDetailViewController.feature = graphic;
This seems to be the problem.  When it is commented out it pushes to the Tableview, but no attributes are present.  When it is not commented out as soon as I hit the graphic button the application will crash without any errors or exceptions.

So has anyone got any pointers for me, or solutions!  Any help would be greatly appreciated!