Is it possible to set the LayerList widget to only show one layer at a time in 4.x?
Solved! Go to Solution.
Alex,
See this sample. It uses a group layer to set the layers to exclusive mode.
var demographicGroupLayer = new GroupLayer({
title: "US Demographics",
visible: true,
visibilityMode: "exclusive",
layers: [USALayer, censusLayer],
opacity: 0.75
});
Is this a 3.x or 4.x API question?
4.x. Sorry, updated the original question.
Alex,
See this sample. It uses a group layer to set the layers to exclusive mode.
var demographicGroupLayer = new GroupLayer({
title: "US Demographics",
visible: true,
visibilityMode: "exclusive",
layers: [USALayer, censusLayer],
opacity: 0.75
});
This could work! Thanks! Do you know if it's possible to default the layer group to be open so it displays all the child layers when the map loads?
See this thread:
https://community.esri.com/thread/192285-how-to-expand-the-layerlist-in-api-43#comment-696533
Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.