I have had to replicate, duplicate, and masticate (it means chew, people) several layers on a web map in order to get them to show up like the clients want them to be shown.
However, now I have a LayerList that is obnoxious with repetitive layers.
Can I remove layers from the LayerList?
And how?
Solved! Go to Solution.
The first place to look at may be your webmap's JSON : http://www.arcgis.com/sharing/content/items/178fc074fc784f5cadd5eba053e73b30/data?f=pjson
Search for "id" and you'll see the ids assigned to map services and feature layers that you added explicitely. For example : IOT_234.
If adressing a layer inside a map service, add _X where X is the layer's id within the service. For example : IOT_234_0
Your particular case has :
IOT_1553 : bridge replacement zoom out
IOT_1553_8354 : bridge replacement zoom in
IOT_1318 : bridge rehabilitation zoom out
IOT_1318_5629 : bridge rehabilitation zoom in
IOT_234 : improve our Tulsa
IOT_234_0 : major street labels
IOT_234_1 : project details
...
IOT_234_7...
Your best bet may be to store the exclude list within a new property inside the layer list widget's config file. Then you patch where I said, checking whether the id belongs to the configured list.
Hello Brian,
Yes, you can remove layers in a web map.
Go to the "Content" tab in the Details section to the left. Click on the arrow next to the layer and choose "Remove Layer".
Hope this helps.
Amanda
I need the layer to STILL show up in the map... just NOT in the LAYERLIST.
Not sure on how to achieve that!
Are you able to do this? In my webmap I only see 'Remove' on the top level map service item. On each layer I only see 'Hide in Legend', but that doesn't remove the layer from the webmap. Is there a way to remove a single layer from a map service added to the webmap?
Hi Brian. Had a similar need. I patched the LayerList widget for it. Don't know if your use case allows that.
File : LayerListView.js
At the beginning of method drawListNode, I added :
if(layerInfo.id ~~~ matches as an id you want to hide) { return; }
I need to make this change to my layer list as well. Can I just download the map I created or do I have to install the developer version of the WAB?
There would be quite a lot of tinkering involved. As soon as you intend to move away from the core functionalities, your workflow will probably always be much more straightforward using the developer edition from the front up. Create your app around your map, save, patch the widget in the resulting app, and you're done.
Do we need to run ArcGIS for Portal when using the developer edition onsite?
No. You download it and you're good to go, no portal involved for the Dev edition. Web AppBuilder for ArcGIS (Developer Edition) | ArcGIS for Developers
However you will need an ArcGIS Online organization or developper account, that'll be used by the builder for authentication if nothing else.