Near Me Widget interaction with the Layer List layers, WAB's 2.8 - 2.11

1094
4
04-22-2019 01:38 PM
DavidColey
Frequent Contributor

Hello - 

I have been using the grouping capability of the header widget in the foldable theme in order to group together various combinations of eSearch, Filter, Group Filter, NearMe, etc with the Layer List widget so that my users are presented with both a layer list and their primary tool in one group when the application opens.

As I am updating my WABs from 2.8 to 2.11, I am noticing that when ever I close the 'Group' widget from its location on the Header, the webmap is returned to it's default state. 

So for example if I want to have my users access the Print widget, and the print widget is contained in the Header, they click the print icon.  That closes the group widget and the map layers are reset to their default visibility setting.

For an example of what I am talking about, go to https://ags3.scgov.net/schoolzone , turn off the green elementary school zones and turn on the blue middle school zones.  Then click the Print Icon on the header.  You will see the map layers revert to their default visibility state.

The only 2 workarounds I can think of are to:

1. Include any widget in the header that, if you want to interact with it while preserving your map layers, then that widget must also be placed in the group.

2. Place any widget, such as Print onto the map as an on-screen widget.

Does anyone have any idea where to go in the WAB to modify this behavior so that when the group of widgets is closed from the header, map layer visibility is not affected?

Thanks,

David

0 Kudos
4 Replies
DavidColey
Frequent Contributor

Sorry -  some additional info.  Seems that this is a little more confounding in that the layer visibility changes only seem to be happening with polygon layers that are in the map.  Line and Point layer default visibility appears to be unaffected by toggling the group of widgets on or off from the header . . . 

0 Kudos
DavidColey
Frequent Contributor

More to add:

Basically anytime you close the group folder to open another widget on the header controller, all layers, filters and queries are reset in the map - anything that participates in the group is reset.  This can't be by design, or if it is we need to know where we can go in the theme to counter this.

I can see this isn't getting alot of traction but it's been going on since at least the 2.8 release.

0 Kudos
DavidColey
Frequent Contributor

So as near as I can tell, this is an issue related to how the Near Me widget interacts in terms of layer visibility, and has nothing to do with grouping the widgets in header. 

Basically, for any layers that participate as Search layers in the Near Me, when the Near Me widget panel closes, it re-sets to the default visibility state as set in the webmap for that layer or layers.  

This happens regardless if the Near Me is contained in an on screen panel or as part of the Header.

Layers in map that do not participate in the Near Me search layers are not affected.  If I can find which function in which js file that controls layer list visibility upon widget close or destroy, I'll post back.

In the meantime I am going to update this question title and adjust my map and widgets to account for this behavior...

0 Kudos
DavidColey
Frequent Contributor

As I continue to work with the Near Me widget, I think that a potential enhancement that may allow the widget's searched layers' visibility to not be affected would be for the developers to provide the ability to to 'set' the Search layers to come from either a portal item or an endpoint - just as the widget does when setting a Source layer.

0 Kudos