Select to view content in your preferred language

Select only from visible layers in Map widget

459
2
12-04-2023 05:56 AM
NeilWebber
New Contributor III

Hi

I have a map widget in an experience. The source map contains 4 hosted feature layers of increasing-resolution generalisations of the same data. All 4 are ticked on, but the visibility ranges are set so that only one layer is visible at any one time as the map zooms in or out. If I click on the map, the pop-up returns info for the relevant features in the currently visible layer as expected (say 8 features).

However, If I use the select tool in the map at the same location, the 'Selected features' counter returns a count of 32 i.e. the selection is done on all 'ticked on' layers in the map, not just the currently visible one. This seems counter-intuitive to me, and when that selection could result in 100s of features being selected, it comes at a performance cost (selecting 4x as many features as is really necessary in my case).

I guess my question is, why do pop-ups return data only on layers in their visible range (correctly in my view), whilst the select tool selects on all layers regardless of that range (incorrectly I think)? Is it by design? Is it a flaw? Is there any way to remedy the issue?
thanks, Neil

0 Kudos
2 Replies
JeffreyThompson2
MVP Regular Contributor

The built-in tools in the Map widget are not customizable in any way other than on/off. I logged a case with ESRI support asking for Select and Measure to be built out as fully customizable widgets the way the Search and Basemap were. I recommend doing the same and maybe also posting it as an idea on the Idea board.

GIS Developer
City of Arlington, Texas
TonghuiMing
Esri Regular Contributor

@NeilWebber Hi Neil,

Yes, the pop-up is based on the click event, while the selection tool is based on geometry, so you've seen the current expected behavior respectively.

The visibility will be considered in the OOTB select widget.

Here is a support ENH request that may cover your case as well - ENH-000154487.

0 Kudos