I'm trying to adapt this sample so that when I have multiple services in the map, all of the layers from each service show in the layer list.
I have attempted a few edits without any luck. The best I can get is one service or the other, but not both.
Is there a way to edit
function buildLayerList(layer) {
var items = dojo.map(layer.layerInfos,function(info,index){
so that it referencees multiple services? And is this even what I need to worry about? There are other places in the code that would need to be amended, but these are the two that stick out to me.