Javascript API TOC/Legend

1049
3
04-03-2013 05:56 AM
Status: Open
KirkWebb
New Contributor III
I have a web mapping application built with javascript and the javascript API.  I needed a legend/Table of Contents that  was dynamic and had layers that could be turned on and off.  I searched the ArcGIS javascript api samples and found nothing like this so I searched other areas and found a legend/TOC that had the functionality I needed.  It comes from the gmaps-utility-gis.  A google search will find it easily.  Here is my app http://174.137.97.101/911Address/Default.aspx
The problem is I would feel more comfortable staying with the ArcGIS API for this functionality so no compatibility issues arise in the future.  Why would it be a good idea for ESRI to add something like this to the API
1. I would say 90% of the web maps I visit from around the country have legends with layers that can be manually turned on and off.  
2. I think it would be an important addition to the ArcGIS API to stay ahead of the curve.
3. In my search for the gmaps legend I found many other developers who were looking for this funtionality.
4. users need the capability to toggle on/off layers.  For example,  If I have multiple imagery datasets from different years a user may want to turn these on and off for comparison.  This would be true of many vector datasets.
Thanks
Kirk Webb 
3 Comments
FrankVeldhuis1
Funny how arcgis online has a table of contents but the javascript api doesn't have a widget.
BjornSvensson

The ArcGIS API for JavaScript added a LayerList widget at version 3.14, and at 3.15 a showLegend option was added.

roemhildtg

If you're looking for an alternative layer control, check out the one cmv uses: Configurable Map Viewer