danyim

Strange Issue with the IdentifyTask

Discussion created by danyim on Feb 24, 2011
Latest reply on Feb 25, 2011 by danyim
When I try to identify a feature, the IdentifyTask's execute function is invoking an error that simply contains the message "Unable to complete operation."

The strange thing is, this identify function works as it should when I use it at either the map's full extent or a specific extent of a feature (when I zoom to a feature via the results in a Datagrid), but once I pan the map even slightly out of that specific extent, the IdentifyTask throws that error.

My code is listed in the following. It's a loose interpretation of the "Identify features on a map" sample provided by ArcGIS.
doIdentify = function(evt) {
    // Hide the previous results
    myMap.infoWindow.hide();
    
    var task = null;
    var params = null;
    
    task = new esri.tasks.IdentifyTask(url.baseMap);
    
    params = new esri.tasks.IdentifyParameters();
    params.tolerance = 4;
    params.returnGeometry = true;
    params.layerIds = [3, 4, 5, 6];
    params.layerOption = esri.tasks.IdentifyParameters.LAYER_OPTION_ALL;
    params.width = myMap.width;
    params.height = myMap.height;
    params.geometry = evt.mapPoint;
    params.mapExtent = myMap.extent;
    task.execute(params, function(idResults) {
        identifyInfoWin(idResults, evt);
    }, function(err) {
        console.log("doIdentify: (" + err.name + ") " + err.message);
    });
};


I consider myself well-acquainted with the ArcGIS JS API, but I have been staring at this problem for much too long without seeking help.

Thanks in advance

Outcomes