Select to view content in your preferred language

Attempting to Replace District Look Up Widget with Near Me, Search and Map Widgets in ExB

202
6
Jump to solution
02-06-2025 01:36 PM
JaredPilbeam2
MVP Alum

Since the District Look Up widget was discontinued, I've been struggling to recreate it as close as possible in ExB so our non-GIS-user-base does not throw its arms up in confusion at the changes.

I've been trying unsuccessfully with the Javascript SDK in numerous ways using the search widget on a feature layer. I've tried the Instant Apps Zone Lookup template; the official replacement. But, I moved on because when I clear search location it only clears the selected points, not the related polygon. Also, the layout leaves a lot to be desired. 

Working in ExB, the layout/design is whatever you want it to be, but getting the widgets to play nice is another thing. What I have so far is really close to my end goal. I need help with these couple things:

  • I'm using a webmap with point and polygon features that have a related join. In ExB, the Near Me widget Analysis is set to Proximity with a search distance of 1.5 miles.
    1.  If you search 302 N. Chicago St., Joliet, for example, it functions the way I expect. I have School set as the Search source and as the selected layer in the Near Me widget. But, what's unexpected is when I click the map (on Joliet, for ex.) the distance of 1.5 miles is added to the polygon too. Why? 
    2. Use map pin and label as on the Zone Lookup Instant App (while at the same time keeping the Map-->Near Me record selection changes).
0 Kudos
1 Solution

Accepted Solutions
JeffreyThompson2
MVP Regular Contributor

You need to enable sharing on your app so we can see it.

The polygon layer is the Selected Feature and you have your analysis set up to search 1.5 miles from the Selected feature. When using the Search Widget, the place the search starts from is a point.

Here's my Zone Lookup in Experience Builder set up.

https://community.esri.com/t5/experience-builder-tips-and-tricks/zone-lookup-in-experience-builder-a...

GIS Developer
City of Arlington, Texas

View solution in original post

0 Kudos
6 Replies
JeffreyThompson2
MVP Regular Contributor

You need to enable sharing on your app so we can see it.

The polygon layer is the Selected Feature and you have your analysis set up to search 1.5 miles from the Selected feature. When using the Search Widget, the place the search starts from is a point.

Here's my Zone Lookup in Experience Builder set up.

https://community.esri.com/t5/experience-builder-tips-and-tricks/zone-lookup-in-experience-builder-a...

GIS Developer
City of Arlington, Texas
0 Kudos
JaredPilbeam2
MVP Alum

It's shared now. 

0 Kudos
JeffreyThompson2
MVP Regular Contributor

What are the polygons on your map? Are they school catchment areas? If so, you could change your search distance to 0 and get the mouse clicks working. Then have your Search Widget trigger a hidden Near Me Widget that finds polygons and triggers the school search as in the linked example.

GIS Developer
City of Arlington, Texas
0 Kudos
JaredPilbeam2
MVP Alum

@JeffreyThompson2 I've been referencing your blogs all along, thank you. Yes, the polygon is a school district that's related to the school point. I'm pretty sure I'm following your steps, but... 

It's a vicious circle. I set the proximity to 1.5 miles in Near Me to get the surrounding schools with an address search, but then the click in the map shows the proximity on the polygon too (which I don't want).

JaredPilbeam2_6-1738944923071.png

 

JaredPilbeam2_2-1738944104325.png

 

If I set the proximity to 0 the search doesn't find any results, but at least the proximity doesn't show up on the polygon when I click the map.

JaredPilbeam2_5-1738944867030.png

 

JaredPilbeam2_3-1738944725174.png

 

0 Kudos
JeffreyThompson2
MVP Regular Contributor

Are you using two Near Me Widgets? In my build, the Search Widget triggers a hidden Near Me Widget that is responsible for finding what polygon the search result is within. This Near Me Widget then tiggers a second Near Me Widget that is responsible for finding the points within the polygon. Clicking the map directly triggers the second Near Me Widget and not the hidden one.

GIS Developer
City of Arlington, Texas
JaredPilbeam2
MVP Alum

No, I wasn't using two widgets when I wrote that. I went over your blog a few more times and it finally does what you'd expect! To hide the additional Search and Near Me widgets I sent them to the back behind the other widgets.

JaredPilbeam2_0-1738960831848.png

 

0 Kudos