AnsweredAssumed Answered

TOC for arcgis javascrip API

Question asked by Adityakumar529 on Jan 14, 2016

Hi All,

I was working on TOC for Javascript api where I am using the widget.

 

http://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109

But sometime the layer will come and some times its not showing.And I am confused what url to use while calling the toc widget.

Following are the code I used.

var dojoConfig = {

        packages: [{

            parseOnLoad: true,

 

 

            name: "agsjs",

            "location": 'http://gmaps-utility-gis.googlecode.com/svn/tags/agsjs/latest/build/agsjs' // for xdomain load 

        }]

    };

 

 

  map.on('layers-add-result', function (evt) {

 

 

 

 

                  var toc = new TOC({

                      map: map,

                      layerInfos: [{

                          layer: Dream_2D,

                          title: "UI-E Layer",

                          collapsed: true,

                          slider: true

                      }, {

                          layer: GSI_2D,

                          title: "2D GIS",

                          collapsed: true,

                          slider: true

 

 

                      },

                       {

                           layer: GSI_3D,

                           title: "3D GIS",

                           collapsed: true,

                           slider: true

 

 

                       },

 

 

                      {

                          layer: base_layer,

                          title: "Base Layer",

                          collapsed: true,

                          slider: true

                      },

                      {

                          layer: satellite,

                          title: "Satellite",

                          collapsed: true,

                          slider: true

                      },

                      ]

                  }, "layerList");

                  toc.startup();

                

              });

 

Any suggestion on this will be helpful.

 

Thanks

Aditya

Outcomes