AnsweredAssumed Answered

How to stop queryTask execution?

Question asked by cadrin on Nov 21, 2012
Latest reply on Nov 23, 2012 by cadrin
Hi all,

i've created my own identify tool with the queryTask, but i can't find a way to stop the execution of the queryTask.

Is there a way to stop the execution?


function identificationTool(action,qryUE,queryTaskUE) {  alert(action);  if(action =="go")  {   dojo.connect(map, "onClick", function(evt)    {    console.log("Identification: click");           //onClick event returns the evt point where the user clicked on the map.          //This is contains the mapPoint (esri.geometry.point) and the screenPoint (pixel xy where the user clicked).          //set query geometry = to evt.mapPoint Geometry          qryUE.geometry = evt.mapPoint;           //Execute task and call showResults on completion          queryTaskUE.execute(qryUE, showResults);             });  }  else  {   dojo.connect(map, "onClick", function(evt)    {                         // Here we should stop the execution of the queryTaskUE    map.infoWindow.hide();   });  } }