Select to view content in your preferred language

Set location for Near Me widget - can you control what layers will activate this?

127
2
4 weeks ago
AdamGebhart
Frequent Contributor

In my application I would like to allow the user to click either a point or line road project feature and use that to set the location and open the Near Me widget.  I know how to add the map trigger to Set location for Near Me and open it, so that's not the problem.

The issue I have is I only need these triggers to work on these two specific layers, but any layer in my map for which I've created a popup can be used in these triggers.  I don't need or want that.

Is it possible to restrict the layers that can be clicked to activate 'Set location' for the Near Me widget  Or is that behavior based on what layer has a popup configured in the web map?

0 Kudos
2 Replies
JeffreyThompson2
MVP Regular Contributor

I think the closest option to your desired design is to use the Feature Info Widget.

  1. Disable the Set Location Action in the Map Widget.
  2. Add a Feature Info Widget with the desired layers on a Selected Features View.
  3. Trigger Near Me from the Feature Info Widget.
GIS Developer
City of Arlington, Texas
0 Kudos
AdamGebhart
Frequent Contributor

Thanks for the suggestion.  Unfortunately, the department I'm setting this up for wants a list of results instead of having to arrow through the information.  We're often dealing with stacked features and during a demonstration of how the Feature Info, List and Near Me widgets all work they liked Near Me the best.  Plus, it will allow their public users to draw irregular shaped lines or polygons to pull results. 

I tried a configuration of the List and Selection widgets interacting to set the location of and open Near Me but they felt it wasn't as convenient as Near Me on its own.

It's not the end of the world.  The other layers in the map for which I've configured popups don't necessarily have to have popups.  They would just be helpful.

Thanks again.

 

0 Kudos