nijkampr

Doubleclick needed for showing callout on identify

Discussion created by nijkampr on Jun 9, 2011
Latest reply on Jun 10, 2011 by njarecha-esristaff
Hi,

I'm using an identifylayer, with the controller. The identify itself works, the object is highlighted with a color, but...
I have to tap the object twice before the callout is shown.

So, summarized:
First tap: Object is selected (Highlighted)
Second tap: Callout is shown

I want to skip the second step, but i have no idea how. I looked into the class reference, but... couldn't find anything...

The code I use:
- (void)mapView:(AGSMapView *)mapView didClickAtPoint:(CGPoint)screen mapPoint:(AGSPoint *)mappoint graphics:(NSDictionary *)graphics {
 self.identifyParams.tolerance = 7;
 self.identifyParams.geometry = mappoint;
 self.identifyParams.size = mapViewController.mapView.bounds.size;
 self.identifyParams.mapEnvelope = mapViewController.mapView.envelope;
 self.identifyParams.returnGeometry = YES;
 self.identifyParams.layerOption = AGSIdentifyParametersLayerOptionAll;
 self.identifyParams.spatialReference = mapViewController.mapView.spatialReference;
    
    
 //execute the task
 [self.identifyTask executeWithParameters:self.identifyParams];
} 

//results are returned
- (void)identifyTask:(AGSIdentifyTask *)identifyTask operation:(NSOperation *)op didExecuteWithIdentifyResults:(NSArray *)results {
    //clear previous results
    [mapViewController.identifyLayer removeAllGraphics];
    _identifyInfoTemplate = [[IdentifyInfoTemplate alloc] init];
    
    for (AGSIdentifyResult* result in results) {
        result.feature.symbol = [self determineAndReturnSymbol:AGSGeometryTypeForGeometry(result.feature.geometry)];
        result.feature.infoTemplateDelegate = _identifyInfoTemplate;
        
        [mapViewController.identifyLayer addGraphic:result.feature];
    }
    
    //call dataChanged on the graphics layer to redraw the graphics
    [mapViewController.identifyLayer dataChanged]; 
    
    
}

Outcomes