How to create TOC (tree structre) that would support group layers and feature layers?

594
6
10-22-2011 07:25 AM
SanajyJadhav
Occasional Contributor II
Hi,

I need to create the tree structure for my TOC that would support group layers (at least 2 levels deep)and feature layers.I have found couple of samples but those would not fulfill my requirements.

Does anybody have a code sample for this.It would be of great help.

Thanks.
0 Kudos
6 Replies
JeffMitzelfelt
New Contributor III
I have been working on something like this and am using a jQuery library called Dynatree.

I have it set up to read the layer information from a REST service and fill in the tree.
0 Kudos
SanajyJadhav
Occasional Contributor II
Thanks Jeff for the reply.

By any chance, can you please post your code here? It would be very useful for me since I am very new to JS API.
0 Kudos
AndrewBrown1
Occasional Contributor II
Not sure if this fulfills your requirements or not, but this is what we currently use:


http://www.arcgis.com/home/item.html?id=9c43bdf76a23452ba1d95684f7cd76d8
0 Kudos
JeffMitzelfelt
New Contributor III
Thanks Andrew. I hadn't seen that before. I just got it wired up and it looks great. Thanks to nliu for putting together a nice tool.
0 Kudos
AndrewBrown1
Occasional Contributor II
You're welcome. Also, see this thread in case you're having any issues with the TOC legend images:

http://forums.arcgis.com/threads/42803-Legend-Dijit-Problem-in-Internet-Explorer-(IE)
0 Kudos
EjayLai
New Contributor II
How would this work with a bunch of kml files,for those who don't have a arcgis server?
0 Kudos