Select to view content in your preferred language

Option in Select Widget to dynamically match layer visibility

258
3
06-12-2024 06:00 AM
Status: Open
JeffreyThompson2
MVP Regular Contributor

In the current behavior of the Select Widget, the selectablity of a layer is unaffected by the visibility of the layer. There are good use cases for this behavior, such as selecting a large area at small-scale that is outside the dynamic visibility of the layer. However in most cases to most users, it would be more intuitive for the selectable layers to dynamically match the visibility of the layer. 

Examples;

  • Turning off the visibility of a layer in the Layer List Widget would make the layer un-selectable.
  • Zooming in to the dynamic visibility range of a layer would make the layer selectable.
  • Zooming out beyond the dynamic visibility range of a layer would make the layer un-selectable.

End users should also have the option of opting-out of this dynamic behavior by using the checkboxes in the Select Widget. i.e. Once a user manually checks a checkbox, it will stay how they put it regardless of how the layer visibility changes.

3 Comments
ECJRIJS

Yes! this would be very handy especially for maps with many layers where it is difficult to find the layers you actually want to use.

I would also opt for more actions with the in-map selectiontool when multiple things are selected. As it is possible within the selection widget to push multiple results to a table, the same would be nice with the in-map selection tool as a real spatial filter. (as also described here: Link the map Select tool to a Table widget - Esri Community .

TimWestern

I'm going to weigh-in on the side of maybe it shouldn't. 

Built in widgets either need to have options you can configure for behavior like proposed, or they need to have a reasonable default.  Layers sometimes are made invisible specifically so they can click more specifically on a particular spot which is hard to see with the noise, but they may want the entire layer group when they select.  (Particularly for people with visual impairments trying to engage with maps)

I actually would not suggest the default be changed. Instead if you want to add an option that makes it so each app could then configure it to their tastes, that would be fine. Otherwise, I suspect the right answer for this is a custom widget, that would then inspect each layer its querying for visibility, and then using your own logic to include/exclude decide whether to include it in the query or not.  You always have more control at the code level than in a prebuilt component.

The reason I say that, is it is often much more difficult to include things than it is to exclude them at least in my experience with Exb so far.  The built in widgets should target the use cases which are more likely to be used by those who are low-code or no-code developers to that end.

JeffreyThompson2

I agree, @TimWestern, this should be added as an option, maybe even an end-user option. It should not be the forced and only option.