When using QueryTask in ArcGIS JS Api 3, I encountered a challenge where I needed to execute multiple queries in one call. After referencing the documentation, I realized that this functionality was not directly supported.
This is my current implementation:
arraygraphic.map(async (e) => {
let query = new esri.tasks.Query();
query.where = "id = '" + id + "'";
query.outFields = ["*"];
let response = await queryTask.execute(query);
})
Here is what I aim to achieve:
let queryList=[];
arraygraphic.map(async (e) => {
let query = new esri.tasks.Query();
query.where = "id = '" + id + "'";
query.outFields = ["*"];
queryList.push(query);
});
let response = await queryTask.execute(queryList);
If you have any suggestions or solutions, I would greatly appreciate it. Thank you in advance.