Query multiple feature layers

807
2
Jump to solution
07-23-2014 12:03 PM
RyanSmith1
New Contributor III

Hi, is it possible to query multiple feature layers using the the .queryFeatures method? I would like to store all results found into a global array which can then be used elsewhere. Is there any sample i could look at for this situation?

Thanks,

Ryan

0 Kudos
1 Solution

Accepted Solutions
StephenLead
Regular Contributor III

To store all results in a global array, you probably want to look at dojo deferred

You would batch up the queries and run them - since they run asynchronously, you'd let the deferred manager handle the receipt of responses, which you would store in the global array.

I posted a similar question on Stack Exchange a while ago - the answer there includes a code sample which may help you.

View solution in original post

2 Replies
StephenLead
Regular Contributor III

To store all results in a global array, you probably want to look at dojo deferred

You would batch up the queries and run them - since they run asynchronously, you'd let the deferred manager handle the receipt of responses, which you would store in the global array.

I posted a similar question on Stack Exchange a while ago - the answer there includes a code sample which may help you.

RyanSmith1
New Contributor III

Thanks for this Stephen, will look into it

0 Kudos