<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: is there a sample or code for a TOC that shows layer names with toggle boxes and symbology? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-sample-or-code-for-a-toc-that-shows/m-p/373442#M34653</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is also's &lt;A href="http://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109"&gt;NLiu's Table of Contents Widget&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Mar 2016 19:29:24 GMT</pubDate>
    <dc:creator>SteveCole</dc:creator>
    <dc:date>2016-03-30T19:29:24Z</dc:date>
    <item>
      <title>is there a sample or code for a TOC that shows layer names with toggle boxes and symbology?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-sample-or-code-for-a-toc-that-shows/m-p/373439#M34650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi all, I'm fairly new to the Javascript API.&amp;nbsp; I want to add a standard table of contents that displays the layer names, toggle boxes to turn layer visibility off and on, and the symbology of the layers.&amp;nbsp; But I don't see any such sample.&amp;nbsp; There's a "Legend" sample that shows layer names and symbology, but doesn't have toggle boxes for visibility.&amp;nbsp; Thanks for any help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dan &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 16:08:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-sample-or-code-for-a-toc-that-shows/m-p/373439#M34650</guid>
      <dc:creator>DanielSchatt</dc:creator>
      <dc:date>2016-03-30T16:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: is there a sample or code for a TOC that shows layer names with toggle boxes and symbology?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-sample-or-code-for-a-toc-that-shows/m-p/373440#M34651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dan, the new version of the &lt;A href="https://developers.arcgis.com/javascript/jsapi/layerlist-amd.html" rel="nofollow noopener noreferrer" target="_blank"&gt;LayerList&lt;/A&gt; contains the property showLegend. By default, this is false, but if you set it to true, you will have the legend swatches included.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
&amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&amp;gt;
&amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"&amp;gt;
&amp;lt;title&amp;gt;Layer List Dijit&amp;lt;/title&amp;gt;
&lt;SPAN&gt;&amp;lt;link rel="stylesheet" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fjs.arcgis.com%2F3.16%2Fdijit%2Fthemes%2Fclaro%2Fclaro.css" target="_blank"&gt;https://js.arcgis.com/3.16/dijit/themes/claro/claro.css&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;
&lt;SPAN&gt;&amp;lt;link rel="stylesheet" href="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fjs.arcgis.com%2F3.16%2Fesri%2Fcss%2Fesri.css" target="_blank"&gt;https://js.arcgis.com/3.16/esri/css/esri.css&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;

&amp;lt;style&amp;gt;
html, body, .container, #map {
&amp;nbsp;&amp;nbsp;&amp;nbsp; height:100%;
&amp;nbsp;&amp;nbsp;&amp;nbsp; width:100%;
&amp;nbsp;&amp;nbsp;&amp;nbsp; margin:0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; padding:0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; margin:0;
&amp;nbsp;&amp;nbsp;&amp;nbsp; font-family: "Open Sans";
}
#map {
&amp;nbsp;&amp;nbsp;&amp;nbsp; padding:0;
}
#layerListPane{
&amp;nbsp;&amp;nbsp;&amp;nbsp; width:25%;
}
.esriLayer{
&amp;nbsp; background-color: #fff;
}
.esriLayerList .esriList{
&amp;nbsp;&amp;nbsp;&amp;nbsp; border-top:none;
}
.esriLayerList .esriTitle {
&amp;nbsp; background-color: #fff;
&amp;nbsp; border-bottom:none;
}
.esriLayerList .esriList ul{
&amp;nbsp; background-color: #fff;
}
&amp;lt;/style&amp;gt;
&amp;lt;script&amp;gt;var dojoConfig = { parseOnLoad: true };&amp;lt;/script&amp;gt;
&lt;SPAN&gt;&amp;lt;script src="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fjs.arcgis.com%2F3.16%2F" target="_blank"&gt;https://js.arcgis.com/3.16/&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&amp;lt;/script&amp;gt;&lt;/SPAN&gt;
&amp;lt;script&amp;gt;
require([
&amp;nbsp;&amp;nbsp;&amp;nbsp; "esri/arcgis/utils",
&amp;nbsp;&amp;nbsp;&amp;nbsp; "esri/dijit/LayerList",
&amp;nbsp;&amp;nbsp;&amp;nbsp; "dijit/layout/BorderContainer", 
&amp;nbsp;&amp;nbsp;&amp;nbsp; "dijit/layout/ContentPane",
&amp;nbsp;&amp;nbsp;&amp;nbsp; "dojo/domReady!"
], function(
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcgisUtils,
&amp;nbsp;&amp;nbsp;&amp;nbsp; LayerList
) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; //Create a map based on an ArcGIS Online web map id 
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcgisUtils.createMap("df8bcc10430f48878b01c96e907a1fc3", "map").then(function(response){
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var myWidget = new LayerList({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map: response.map,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layers: arcgisUtils.getLayerList(response),
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; showLegend: true
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },"layerList");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myWidget.startup();
&amp;nbsp;&amp;nbsp;&amp;nbsp; });

});
&amp;lt;/script&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body class="claro"&amp;gt;
&amp;lt;div class="container" data-dojo-type="dijit/layout/BorderContainer" 
data-dojo-props="design:'headline',gutters:false"&amp;gt;
&amp;lt;div id="layerListPane" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'right'"&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="layerList"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div id="map" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'"&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:15:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-sample-or-code-for-a-toc-that-shows/m-p/373440#M34651</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-11T17:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: is there a sample or code for a TOC that shows layer names with toggle boxes and symbology?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-sample-or-code-for-a-toc-that-shows/m-p/373441#M34652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just created an unordered list in html for each layer on the map. You can use the API to acquire a collection of your layers and then you just use the layer's hide/show as your click event for your check boxes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 18:47:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-sample-or-code-for-a-toc-that-shows/m-p/373441#M34652</guid>
      <dc:creator>TyroneBiggums</dc:creator>
      <dc:date>2016-03-30T18:47:54Z</dc:date>
    </item>
    <item>
      <title>Re: is there a sample or code for a TOC that shows layer names with toggle boxes and symbology?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-sample-or-code-for-a-toc-that-shows/m-p/373442#M34653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is also's &lt;A href="http://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109"&gt;NLiu's Table of Contents Widget&lt;/A&gt;.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Mar 2016 19:29:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/is-there-a-sample-or-code-for-a-toc-that-shows/m-p/373442#M34653</guid>
      <dc:creator>SteveCole</dc:creator>
      <dc:date>2016-03-30T19:29:24Z</dc:date>
    </item>
  </channel>
</rss>

