Can anyone please tell me... how can you perform a Query/QueryTask on multiple layers? I know you can perform a Find/FindTask on multiple layers by including multiple numbers in the array: findParams.layerIds = [0,1,2]. But I can't find the equivalent for Query/QueryTask.
Thanks for any help!
Solved! Go to Solution.
Hi Peggy,
Here is a sample that demonstrates this.
Thanks Jake, Todd and thejus.
All replies were helpful. I'll try to work my way through using PROMISES - Yikes!
Hi Peggy,
See if this can help Manage results from multiple queries | ArcGIS API for JavaScript
[Edit: Jake's answer is the same as mine, he fired it up while I was writing this ]
Cheers,
Todd
You can not query on multiple layers at the same time. What you could do is query on each layers and combine the results together using the dojo/promise/all as discussed in this thread
Only instead of layer.queryFeatures your need to use QueryTask for each of the layers.