Near Me widget turns on superfluous layers

1108
7
01-31-2019 08:45 PM
SandraRech
New Contributor II

I used WAB for ArcGIS (not the Developer version) to configure one of my first apps. The Near Me widget is not behaving the way I would expect it to.

When using the widget, it returns any features within the searchable layers but draws almost ALL the layers, regardless of whether any results were returned. Once the widget is closed, all these layers stay on. The only layers that are not turned on are where the group layer was turned off by default. I have attached screen images of before and after using Near Me.

Ideally, only the layers that return a search result should be visible while the widget is in use...and I would prefer it if the layers would return to the state that they were in prior to using Near Me. All the layers are published in a single map service. I have read about other workarounds (including duplicating 'invisible' layers for Near Me) but these are not desirable.

This question may be related to these posts, but haven't solved my problem:

https://esri.jiveon.com/ideas/13025-agol-wab-near-me-widget-dont-turn-on-new-layers

https://community.esri.com/thread/191769-wab-near-me-widget-layers-stay-on-after-use#

Any advice appreciated.

Sandra

7 Replies
by Anonymous User
Not applicable

Sandra, where you ever able to find a work around for this issue or was the issue ever resolved? 

0 Kudos
SandraRech
New Contributor II

Unfortunately still not resolved. This issue is preventing us from progressing our plan to deploy a public map on our website for community engagement purposes and enquiries. 

0 Kudos
by Anonymous User
Not applicable

I contacted Esri Tech Support with the issue about a week ago and they are working on it for me. I'll let you know if there is a solution/work around!

SandraRech
New Contributor II

Thanks Siona, will be most interested to hear what the outcome is...hopefully a permanent solution!

0 Kudos
SandraRech
New Contributor II

Any more updates from ESRI on this issue?

0 Kudos
by Anonymous User
Not applicable

Hi there Sandra! Sorry for the late reply. After being on the phone for some time with tech support, there was no real solution to the issue except to create a brand new web map and app.. It solved my issue with the superfluous layers turning on but its worrisome that the only solution is to basically recreate an entire project. After recreating my web map and app, I haven't had the same issue again though. 

0 Kudos
SandraRech
New Contributor II

Latest update - I have discovered the cause of my issue. The map service, which is hosted on ArcGIS server, has many layers which have been grouped into categories e.g. Boundaries, Assets, Topographic etc. I had set some of these group layers on by default because some of the sub-layers need to be on by default. The issue of ALL sub-layers being turned ON after using the Near Me widget occurs when those sub-layers are under a group layer that is also ON by default (even if those sub-layers are not configured as a search layer). Sub-layers that are under a group layer that is OFF by default remain OFF after using Near Me.

I re-organised my map in ArcMap so that any layer that needs to be ON by default sits under a group layer that is also on. All other layers that I want to remain OFF by default sit under group layers that are also OFF. This is the only way I can get the Near Me widget to work the way I want it to (layers to remain OFF after using it).

However, a separate issue has also been found which Esri has been able to replicate and will be reported as a bug. This issue is that the layer state is inconsistent after using the Near Me widget under certain circumstances.