Dynamic Filtering based on Web Map Selection

3744
6
Jump to solution
03-30-2016 04:48 PM
DavidWasserman
Regular Contributor

Hi All,

I have a theoretical question about using web app builder/AGOL/API/ Whatever else is required to do this. I found an API thread from 2012 that has a similar question to what I have which is, how do you link feature classes visibility to the selection of another feature class in the web map. I imagine this would work similarly to an "Ask For Values" filter in AGOL, but the values would be dynamic and linked based in map selection. I have looked at the Query Widget and I am still unclear if it provides exactly what I am thinking about.
Example Scenario: I have a map of Census Tracts, and whenever I click on a Census tract, I want to see a conventional 3 mile buffer from its centroid that is filtered based on some unique ID in the Census tract. All the other buffer sin the feature class this buffer comes from do not appear, only the one selected by the user. Conventionally, I have solved this problem with pop ups that show a static map/infographic/image that is associated with the point of interest. I was hoping someone might have an idea or example of this type of behavior in the wild.

Thoughts or help would be great.

David

David Wasserman, AICP
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

David,

Yes a custom app if going for a JS API app or a cusrom widget if going for use in WAB. Definitely not supported otb.

View solution in original post

6 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

David,

  So you are saying that you want to click on a census track buffer it by 3 miles.. then I get lost in your requested workflow.

All the other buffer sin the feature class this buffer comes from do not appear, only the one selected by the user

I am not sure what you are saying/wanting here.

DavidWasserman
Regular Contributor

Hey Robert!

I hoped you would be the one to find this! Sorry for not being very clear. I essentially want to relate two feature classes to a "reference feature class". So for example imagine we have service areas created from network analyst, if we display all of them at the same time, it looks meaningless because you can't tell what the origin point is. I want to be able to select the origin point in the app, and only those origins service areas appear on the map. I was thinking about it like a field definition query that would change based on the selection of an arbitrary feature class. I think for AGOL this concept is called filtering.

Does this make more sense?

David

David Wasserman, AICP
0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

David,

  OK i think I am following your logic now. But what about your desired workflow? Is this to be a custom JS app or a WAB widget and what is the more precise workflow steps (ie. the user opens the app and clicks on a feature in the map and then other features get their definitionQuery adjusted, and then what resets it back to normal and what tells them to even click on the feature in the first place?).

DavidWasserman
Regular Contributor

Hey Robert,

Thanks for helping me articulate this further.
So I guess the user experience can go in a variety of directions. I was potentially thinking of a splash screen that explains how the application works and explaining that they just need to click on a polygon/point to see its individual service area related to it.
After the splash screen I was thinking in the best case it would work like a pop up, except when  a feature is clicked, a new geography becomes visible. If that can't be done, the select features selection UI that comes with things like the charting widget would suffice if it had to be done in a custom app.

I imagine what I want is similar to filtering "Ask for Values" except the value is  a spatial selection, which I am not sure is natively supported. Does this need a custom widget?

David

David Wasserman, AICP
0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

David,

Yes a custom app if going for a JS API app or a cusrom widget if going for use in WAB. Definitely not supported otb.

DavidWasserman
Regular Contributor

Was afraid you would say that. If you have any ideas on how to do something similar let me know. If not we might just go with the attached pop up route...

Thanks Robert,

David

David Wasserman, AICP
0 Kudos