AnsweredAssumed Answered

Asynchronous query calls

Question asked by wanderingwarden on May 28, 2012
Latest reply on May 29, 2012 by wanderingwarden
Hi all,

I'm still a newbie with the Javascript API, but my issue seems very similar to one solved on the Flex API forum. I am running multiple queries, and I need to know which layerId the resulting featuresets come from. As the results are asynchronous, I'm not sure which featureset comes from which layer.

The solution on the Flex forum was:

Add the reference to your layer when you do the query like:  queryTask.execute(query, new AsyncResponder(onResult, onFault, myLayerID));  Then define your result handler like :  function onResult(featureSet:FeatureSet, myLayerID:Number):void { ... }


is there a way to do a similar thing in javascript by creating a new AsyncResponder?

Thanks very much
Andrew

Outcomes