Select to view content in your preferred language

legendEnabled property has no effect

152
2
Jump to solution
3 weeks ago
JaredPilbeam2
MVP Alum

I'm attempting to remove an esri TileLayer from the legend. This does not remove it:

esriTileLayer = new TileLayer({ 
    url: "https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer",
    legendEnabled: false,
    title: "I'm a title",
});

JaredPilbeam2_0-1745414690499.png

 

If I do not give it a title the default still appears:

esriTileLayer = new TileLayer({ 
    url: "https://services.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer",
    legendEnabled: false,
    // title: "I'm a title",
});

JaredPilbeam2_1-1745414779104.png

 

0 Kudos
1 Solution

Accepted Solutions
Sage_Wall
Esri Regular Contributor

Hi @JaredPilbeam2 ,

The screenshots show the LayerList widget/component.  If you want to hide the layer from being displayed in the LayerList you can use the listMode property.

View solution in original post

2 Replies
Sage_Wall
Esri Regular Contributor

Hi @JaredPilbeam2 ,

The screenshots show the LayerList widget/component.  If you want to hide the layer from being displayed in the LayerList you can use the listMode property.

JaredPilbeam2
MVP Alum

AH, yes, it is a LayerList! Whoops. 

0 Kudos