AnsweredAssumed Answered

query isn't responding

Question asked by dmortenson on Jan 9, 2014
Latest reply on Jan 10, 2014 by dmortenson
I have a function that does a QueryTask. However, it doesn't seem to be responding.

When I run the following script, the alert message for "start a" and "end a" show up. But the "start b" does not. So it means it's skipping my queryTask and not really executing. Not sure what I'm missing.

function zoomtrsFunction() {    require([     "esri/map",     "esri/geometry/Extent",         "esri/SpatialReference",         "esri/geometry/Point",         "esri/tasks/query",         "esri/tasks/QueryTask"              ], function(      Map,      Extent,      SpatialReference,      Point,           Query,      QueryTask ) {                            var queryTask = new QueryTask("");            var query = new Query();            var statement = "...long query string is added here...";             query.Where =  statement;            query.returnGeometry = true;            alert("start a");                                 queryTask.execute(query, showResults);                        alert("end a");           });               }               function showResults(featureSet){         alert("start b");         //;                  var resultFeatures = featureSet.features;         if (resultFeatures.length == 1) {           var graphic = resultFeatures[0];           graphic.setSymbol(symbol);           nameGraphic =;           var thePoint = resultFeatures[0].geometry;//get single point , 13);          } }