I am trying to identify data from multiple map service and then merge in single array for further processing. The identify task works but when defCntyTask.addCallback is executed response.length return Undefined and nothing executes further.
defCntyTask.addCallback(function(response){console.log("Completed County Id task " + response.length);}); defwellTask.addCallback(function(response){console.log("Complete Well Id task " + response.length);}); defpropTask.addCallback(function(response){console.log("Complete Property Id task " + response.length);});
var defIdList = new dojo.DeferredList([defCntyTask,defwellTask,defpropTask]);
var idTaskComplete = function() { Console.log("All Id task complete, Call merge results process "); }
I believe the Identify results can not be used with dojo.DeferredList(...). You could look at the 'Identify' related items on the 'Web Application Templates' group on ArcGIS.com (link) that have similar behavior. There's a lot of extra stuff in the code you probably don't need, but it shows a general pattern of how this could be done.