Does anyone have an idea on how I can use the Near Me widget with two different layers? I would like to use a layer that is going to be the territory, called Layer#1 for example. I would like to search inside of Layer#1 for items in a different layer called Layer#2. If the user chooses a near me location outside of the territory, (Layer#1) they would get a response stating that is not a valid search location.
Thank you in advance for any ideas. I have a feeling I need to be setting this up in the Map and not in EB but I have no clue at this point. I did see one example of this and the area outside of Layer#1 was grayed out and I would be great with that, just don't know how to do it.
Terry
I am including a map I saw that had this functionality. I did reach out but have not gotten a response as of yet, so I wanted to see if anyone here had any ideas.
Easiest (no-code): use Zone Lookup Instant App
Web map with Layer#1 (territory) + Layer#2 (targets).
Zone Lookup → set Zone layer = Layer#1, “Layers to show in zone” = Layer#2.
Turn on “Mask outside zone / gray out outside” and “Show message when address not in a zone.”
Result: users click/tap; if outside territory → friendly “not a valid location” message.
Experience Builder (Near Me) setup
Keep Near Me searching Layer#2.
Add a Query (or Filter) against Layer#1 that runs on map click (point buffer = 0) with Intersects.
If the Query returns 0 features, show an Alert/Text (“Outside territory”) and don’t run Near Me.
If ≥1, let Near Me execute; optionally add a mask layer in the web map (big rectangle minus territories) to gray out outside.
Thank you so much @VenkataKondepati for your reply, unfortunately I have to use the "Experience Builder (Near Me) setup" as I have other functions the Near Me widget preforms for the end user.
Hi @TerrySteege
If I understand your workflow correctly, you are looking to get results from Layer 2 that are intersected with Layer 1.
For example, I have a School district layer and a school layer. I would like to find all the schools within a particular school district.
In this type scenario, you can use multiple options, I have mentioned just two in here but you can also accomplish the same workflow using Filter, Query, List and other widgets as @VenkataKondepati mentioned.
Run Near Me when a feature is selected on the map
Search a School district in the search widget and return all the schools within that district