Hi,
I'm trying to start several Identify tasks simultaneously, the results of each must be associated with a predetermined object. The issue is how to know what object to assign which response to?
In silverlight I used the 'userToken' object which did a round trip and was passed back with the results. How is this achieved in JavaScript against the REST API?
Assuming there is no pass back facility exists I looked at using the deferred functionailty of DOJO:
LOOP N = 1 to Query.count
var OBJ = Query(N); //OBJ to be attached to results is known here
idfyParams.geometry = OBJ.geometry
var idfyTask = new esri.tasks.IdentifyTask(url);
idfyTask.execute(idfyParams).then(function(results){
//Use results and OBJ or QUERY(N)
});
END LOOP
So will OBJ, N or QUERY(N) be correct when identify resolves each time? Do I need to hitch the OBJ? I wonder if OBJ will just be the last value it was set to i.e. QUERY(QUERY.count).
Thanks,
Matthew