AGO Situational Awareness Widget Search Procedure

566
3
10-22-2018 10:57 AM
RussellWatkins1
New Contributor

Wondering if anyone has more detailed technical documentation or insight into how AGO Situational Awareness Widget searches through a layer database?  once a point or line is drawn, the display zooms to the extent of the buffer, but that intelligence is not used.  seems like the widget searches through the entire database for included records.  

if it was clear what the process was, i might be able to optimize the data to speed up the search.

thanks

0 Kudos
3 Replies
JohnHauck
Occasional Contributor II

When you visit a tab it calls FeatureLayer.queryIds to get the OIDs for all features that intersect with the drawn shape in the given layer. It then compares the length of this ID array to see if it needs to chunk the feature requests if the number of IDs exceed the layers max record count. Then calls FeatureLayer.queryFeatures passing in the appropriate feature IDs. The underlying interaction with the database is based on how the ArcGIS JS API handles the functions listed above.

RussellWatkins1
New Contributor

OK, so based on your explanation, I think it is the “chunking” method that I am most interested in. I regularly work with large data sets at the county and state level, usually pushing the limits of AGO.

I have done a bit of experimentation with maxrecordcount and the number of records in a hosted feature layer. Setting the count to 1000000 and a buffer radius of 50 miles returns ~800,000 records in approximately 3 minutes (depending on the browser used) for county level data.

Using the same settings for a statewide layer, with approximately 7x the number of records yields “no results”. I’m guessing the query times out because the intersect query searches through the entire database rather than just the records within the map view extents shown when the view is zoomed to the buffer extents?

So then the question is, what is the max number of records that can be queried and yield a result??

Make sense?

thanks

0 Kudos
RussellWatkins1
New Contributor

i might note that this question has been viewed 68 times, with only one somewhat opaque response from staff tot he first question and no response to the second... is there no answer?  unknowable? black box?  just work around it like so many other features?

0 Kudos