AnsweredAssumed Answered

How to Deal with a Query in a Loop in order to Set Extent based on all Results

Question asked by william.miller_WarrenCoGIS on Mar 17, 2017
Latest reply on Mar 22, 2017 by william.miller_WarrenCoGIS

Hello,

I have a query in a loop. I have added .then to the end of the queryTask (see below) to add a graphic for each result upon resolution, but I want to set the extent based on all the results. How do I do this?

queryTask.execute(query, lang.hitch(this, this._onQueryResult, symbolColor, include, def, i), lang.hitch(this, function(error){
  def.resolve({state: 'failure', value: error});
})).then(this.list._addResults(i));

Any help is greatly appreciated.

William

Outcomes