Configure Experience Builder Search Widget to Select Feature from Map

04-27-2022 04:19 PM
New Contributor III

I’m wondering if it’s possible to configure the search widget actions to select a feature from the map widget that the search result (address) is within AND if it’s possible with a custom locator service?  So, if you search for an address and it falls within a census tract in your web map, I’d like to be able to configure the search widget to select that census tract that contains the address.  Thanks in advance!

5 Replies
New Contributor III

Map widget can be configured to filter data based on Map Extent change via Action Trigger

But Search Widget doesnt have an option to Connect to a Data Source, so I don't think it will apply that filter to search by out of the box

0 Kudos
Occasional Contributor III

The Search widget (using a locator) results in a data source containing a single point that you can use as a spatial filter in the Query widget.  When users run the query this can select the corresponding polygon in the Map widget.

Of course this is not as simple as what you are asking - the users would have to use the Search widget and then the Query widget to achieve your objective.  I am pretty certain that you would need to create a custom widget using the developer edition to perform the spatial query and selection if you don't want the users to deal with the Query widget.

New Contributor III

Thanks, Dave.  That's a great suggestion and more or less achieves what I was hoping to do.  

0 Kudos
New Contributor II

Also running into this issue. Dave offered a great workaround that works, but I provide data for people who want less tools and just want a quick answer. More processes means less people will use it, unfortunately. 

Filtering, using the actions/triggers, doesn't work if you have a large dataset (say, parcel layers or zoning district layers) where the neighboring features and information contained therein are just as important as the feature in question.

ESRI, this was offered in Web App Builder and it would be great in Experience Builder.

Occasional Contributor

I too am seeking a solution for this.  A most basic common task is to search for address using the world geocoder, the map zooms to the location and adds a marker to the map, and automatically displays a popup showing attributes from layers in the map at that location. 

Using the search tool built into the map adds a marker to the map and zooms to the location, but then the user has to close the callout that appears on the map, and then has to click on the map at the location to get the popup.  That is a lot more steps for the user than what they did previously in a WAB app I am migrating, and customers are not accepting it.

As a result I will have no choice but to modify the existing search widget, with EXB developer, but that code is nearly completely undocumented so its hard to know where to even start!

If someone has come across this already and has a custom widget or pointers for modifying the search widget code it would be greatly appreciated!