Select to view content in your preferred language

Is it possible to hide specific layers in the Legend with Web App Builder?

4104
1
05-27-2015 08:56 AM
PaigeLester1
New Contributor III

I have created a web map in AGOL with a Map Image Layer service coming from my organization's ArcGIS Server, to which I shared from ArcMap. In the web map, I am able to select specific layers that I want to hide in the legend, and suspected that the web map specification should mirror in the application built with Web App Builder. It does not, as I am unable to hide anything in the Legend in the App's configuration steps. Due to this, I have completely omitted the Legend from the app, which is very uncharacteristic of any sort of map making ever. Why shouldn't the web map be the driver of the content in the Application?

You might ask: Why do I want to hide layers?

I want to hide certain layers because I have duplicates of the same layers to support certain symbology and mainly labeling. The labeling limitations in AGOL are quite significant and can kill a project or a map in many cases. Labeling is such a basic cartographic function that I'm astounded that it's not a bigger priority in AGOL, if that's the direction that ESRI wants to go.

1 Reply
KellyGerrow
Esri Frequent Contributor

Hi Paige,

This appears to be an issue with setting hide in legend setting on layers in a map image layer. A defect has been logged regarding this. To work around the issue, try adding your layers individually to the web map and then setting the hide in legend setting.

For example if the USA map service was your service,

http://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer

You would need to add each layer individually:

Cities:

http://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/0

Highways

http://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/1

States

http://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/2

Counties

http://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/3

After the data has been added, set the hide in legend settings and they will be persisted in the Web App Builder.

Here is a sample of the webmap described above:

http://arcg.is/1AAstlq

Thanks,

-Kelly

0 Kudos