Solved! Go to Solution.
map.on("layers-add-result", function (evt) { toc = new TOC({ map: map, layerInfos: [{ layer: layerDynamic, title: "Legend", slider: true }] }, 'legendDiv'); toc.startup(); toc.on("load", function () { toc.findTOCNode(layerDynamic, 1).hide(); }); });
map.on("layers-add-result", function (evt) { toc = new TOC({ map: map, layerInfos: [{ layer: layerDynamic, title: "Legend", slider: true }] }, 'legendDiv'); toc.startup(); toc.on("load", function () { toc.findTOCNode(layerDynamic, 1).hide(); }); });