I am using the filter widget in my web map but there are a few tweaks I would like to make.
One thing I noticed while using the filter widget is, if you uncheck the check mark in the top right corner of the widget after you filter, your map features that you filtered will go away but your inputs in the widget itself do not clear. This will potentially cause confusion with the end users because they will have to go and delete each input if they're interested in doing another filter search. Is there a way I can customize the filter widget so that when the check mark is unchecked it will not only clear the filtered map features but it will also clear the inputs?
Second, is there a way to customize the filter widget window to make it smaller? On a standard size desktop screen the widget covers a large portion of the map view and I would like it to be smaller to create more space to view the map itself. I know this can be done in dashboard theme but I am currently using foldable theme. Can I customize the filter widget itself or do I have to use another theme?
Third, how can I add the same zoom feature that query widget has to the filter widget? I would like the map to zoom to the filtered features of the map layer.
Lastly, depending on how complicated, I would like it to automatically go to the map's initial extent once the filtered features are cleared/unchecked.
Thanks!
Solved! Go to Solution.
Melissa, after making the changes to the widget for that app and in-checking the filter what does your browsers web console say the error is?
it read "sp.valueProvider._dijit" is undefined
What are your filter inputs? I tested a strings input.
Some of my filter inputs are congressional district numbers and some of them are strings (city, county, facility names)
Did you ever resolve this issue? I am encountering the same error.
Hello Robert,
I have a follow up question to this reply. We are trying to customize the Filter Widget so that the user can only select one filter scenario at a time. For example, if you have three expressions and select one, the other two scenarios will automatically deselect. We are trying to implement a poor-persons "floor switcher." We have a building with three floors and have an expression setup for each one (floor=1, floor=2, floor=3 respectively). When a user selects floor one and then wants to see floor two, when the floor two filter is selected we want the floor one filter to automatically turn off. Is this similar to what's being asked above by Mellisa?
Thank you in advance.
Tom
Tomas,
No her question was about clearing the user input when the filter is cleared.
Hi Robert,
Can I implement these same changes to the query widget.js except anywhere the word "filter" appears in your customized code just change it to "query"?
Thanks,
Melissa
Nope that is a whole other animal.