Select to view content in your preferred language

Query task not showing results

3931
11
Jump to solution
10-27-2015 04:00 AM
SadanandacharB1
Occasional Contributor

Hi All

I am doing query task using dojo and arcgis javscript,

but the result is not showing, there is no error, please help me, I am new to javascriptQueryTask.jpg

0 Kudos
11 Replies
thejuskambi
Frequent Contributor

Hello Sadananachar,

I think that is because of the scope of function. first you need to use this._map and not just _map. Second you need to ensure that the scope of the fuction is at module level. this can be achieved by using lang.hitch. For query task it should be something like this.

queryTask.execute(query, lang.hitch(this, this.showResults));

Also in your case you need to ensure that the function where you are setting up the query (_onSubmitClick)is also in the same scope. But In your case it seems to be ok as you are already using this.showResults. If it is not working then you need to hitch it to the right scope as well.

Thejus

SadanandacharB1
Occasional Contributor

Hi thejus many many many many.... thanks to you, it solved my problem

0 Kudos