Code written as follows: var eT=esri.tasks,idTask,idParam, runIT;
idTask= new eT.IdentifyTask("http://example/myMyServer");
idParam= new eT.IdentifyParameters();
idParam.layerOption=eT.IdentifyParameters.LAYER_OPTION_VISIBLE;
idParam.layerIds=[0,1,2,3,4,5,6,7,8,9,10];
idParam.tolerance=1;
idParam.mapExtent=map.extent;
runIT=makeIT(idTask,idParam);
function makeIT(tsk,param){
return function (e){
param.height = map.height;
param.width = map.width;
param.geometryType="esriGeometryMultipoint";
param.geometry=e;
return tsk.execute(param);
}
}
...
var def=runIT(myMultipoint);
(The closure structure is to allow passing static parameters upon creation of the identify task)Single point identify operations work with this code, but multipoint operations only return a single point.(returnGeometry doesn't fix this).The service identified against is a DynamicMapService containing rasters from which I intend to identify pixel values.