JS - Legend display Only for last added layer

2400
1
11-07-2014 12:15 PM
ShaningYu
Frequent Contributor

In a TOC panel, I added several Operational Layers by the piece of code below:

            var sliderTOC = new agsjs.dijit.TOC({               

                map: map,

                layerInfos: [{

                     layer: operational1,

                     title: "by Site",

                    noLayers: true

                 }, {

                     layer: operational2,

                     title: "by Zip",

                     noLayers: true

                 }, {

                     layer: operational3,

                     title: "Distribution",

                     noLayers: true

                 }], style: 'inline'

            }, 'sliderDiv');

             sliderTOC.startup();

I expected legend displays for all of the layers.  However, on the displayed page, legend displays only for the last added layer.  How can this problem be debugged?  Thanks.

0 Kudos
1 Reply
KenBuja
MVP Esteemed Contributor

Can you post more of your code that illustrates this issue (or create a Fiddle?)

0 Kudos