Thanks Robert I have seen code similar to this and I have used it to print out my layer structure in the console. I have also took a look at layerStructure as layerInfos is depreciating.
Im still slightly confused as to what I pass into the dijit, it requireds a FeatuerLayer, does the resulting LayerInfos contain the featuerlayers that I can pass in or just the info about them? how can get a feature layer to pass into the dijit from this?
Heres the code I have so far that prints my layers to the console, uses layerstructure instead of layerinfos but I assume they are similar.
var layerStructure = new LayerStructure.getInstance();
console.log(layerStructure);
this._printLayerTree(layerStructure);
_printLayerTree: function(layerStructure) {
layerStructure.traversal(function(layerNode) {
var indent = "";
for(var i = 0; i < layerNode.getNodeLevel(); i++) {indent += " ";}
console.log(indent, layerNode.title);
});
},
Im trying to pass 3 feature layers into FeatureSetChooserForMultipleLayers dijit.