AnsweredAssumed Answered

Too many Layers appearing in TOC

Question asked by whileyryan on Jul 17, 2013
Latest reply on Jul 19, 2013 by kenbuja
Hello,

Right now I'm working with a Table of Contents, and I have gotten everything to work just fine.  But the table of contents is displaying too many layers.  I've changed the setVisibleLayers to different layers, and then the map will not show up.  Most of the layers I have not even been able to find in my service directory, and there are three "undefined" layers.  Then most of the layers repeat themselves, one with full functionality and the other without.  So I am not really sure where all these other layers are coming from and why they are repeating themselves.  I've attached an image of my TOC, and also the code for it is below.  
var operationalLayer4 = new esri.layers.FeatureLayer("http://curacaogis.com/ArcGIS/rest/services/Ryan/Ryan_Service/FeatureServer", {                  id: 'operationalLayer4'             });        dojo.connect(map, 'onLayersAddResult', function(results) {                  var standardTOC = new agsjs.dijit.TOC({                    map: map                  }, 'standardDiv');                  standardTOC.startup();   });     map.addLayer(operationalLayer4);   


If there is any advice anyone could give me to point me in the right direction, I'd really appreciate it.


Thanks!
Ryan

Attachments

Outcomes