Select to view content in your preferred language

TOC Toolkit documentation?

1096
9
05-27-2014 05:01 AM
CharlesGant
Occasional Contributor
Does anyone know where I can find the TOC toolkit documentation?  The link to the actual download does not indicate such, and I could not find anything in the downloaded tarball.  I'm particularly interested in the options/arguments that I can apply to each layer. I have the TOC working, I just need to be able to setup the icon, opacity, collapse, etc.....

Thanks in advance!
0 Kudos
9 Replies
CharlesGant
Occasional Contributor
http://gmaps-utility-gis.googlecode.com/svn/tags/agsjs/latest/docs/toc/reference.html


Jeff,

Do you know how to set all the layers to "un-check" by default?  I have the layers hidden, so they don't show, but the boxes in the TOC are check and for them to work you have to "un-check" and "re-check" them.

Thanks!
0 Kudos
JeffPace
MVP Alum
mine obey visibility.  Make sure you arent grouping layers in your mapservice, TOC can't handle groups
0 Kudos
CharlesGant
Occasional Contributor
mine obey visibility.  Make sure you arent grouping layers in your mapservice, TOC can't handle groups


Jeff, As you can see they are not grouped.  When you say "obey visibility", are you setting the layers invisible when you declare, or like the method I'm using below?


   //Use the ImageParameters to set the invisible layers in the map service during ArcGISDynamicMapServiceLayer construction.
   var imageParameters = new ImageParameters();
   imageParameters.layerIds = [0,1];
   imageParameters.layerOption = ImageParameters.LAYER_OPTION_INCLUDE;
   //can also be: LAYER_OPTION_EXCLUDE, LAYER_OPTION_HIDE, LAYER_OPTION_INCLUDE
     
   //Takes a URL to a non cached map service.
   var dynamicMapServiceLayer0 = new ArcGISDynamicMapServiceLayer("http://atlas.resources.ca.gov/ArcGIS/rest/services/Atmosphere_Climate/RIDGE_Precip_Radar/MapServer/", {
      "opacity" : 0.5,"imageParameters":imageParameters});
   
   //Takes a URL to a non cached map service.
   var dynamicMapServiceLayer1 = new ArcGISDynamicMapServiceLayer("http://gisdev.srh.noaa.gov/arcgis/rest/services/GSP/gffg/MapServer", {
      "opacity" : 0.5,"imageParameters":imageParameters});
   
   map.addLayer(dynamicMapServiceLayer0);
   map.addLayer(dynamicMapServiceLayer1);
0 Kudos
PeterHoffman
Deactivated User
I am new to JavaScript coding and just found this thread. How do I download the toc code?

Thanks,
0 Kudos
JonathanUihlein
Esri Regular Contributor
I am new to JavaScript coding and just found this thread. How do I download the toc code?

Thanks,


Hi Peter, there was a link posted earlier in this thread.

https://code.google.com/p/gmaps-utility-gis/
0 Kudos
PeterHoffman
Deactivated User
I found the link but it leads to a folder structure of the files. Is there a zip file or equiv.?
0 Kudos
JonathanUihlein
Esri Regular Contributor
Using Google (searched for: esri toc widget)... first link. (http://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109)

Scroll down. There's a zip file link there.

Also, if you've never used GIT or a version-control system, you're missing out on some good stuff.
0 Kudos
PeterHoffman
Deactivated User
Yep, that's what I need, thanks for quick reply.
I am starting to move my flash based apps to javascript so I am looking for widgets, etc.
0 Kudos