<?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: ArcGIS JavaScript API: Legend and checkbox in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-javascript-api-legend-and-checkbox/m-p/1104556#M74873</link>
    <description>&lt;P&gt;Jake, I know this is quite old but figured I would give this a shot in asking a question.&amp;nbsp; Can you put a legend under each checkbox as they are checked.&amp;nbsp; I don't want a different tab to show the legend I was users to see the legend for that particular layer as they turn the layer on and off underneath it.&amp;nbsp; Thanks and hopefully you get this reply.&lt;/P&gt;</description>
    <pubDate>Mon, 04 Oct 2021 20:09:18 GMT</pubDate>
    <dc:creator>JohnRitsko1</dc:creator>
    <dc:date>2021-10-04T20:09:18Z</dc:date>
    <item>
      <title>ArcGIS JavaScript API: Legend and checkbox</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-javascript-api-legend-and-checkbox/m-p/223289#M20749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a web map with three feature layers and one dynamic map layer, and when I use the legend code it is displaying only the three feature layers. What do I need to display all four layers in the legend. Also how do I add a checkbox to display only the checked layers. Here is the code I'm using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14121592231121215 jive_text_macro" jivemacro_uid="_14121592231121215"&gt;
&lt;P&gt;//add the legend&lt;/P&gt;
&lt;P&gt;&amp;nbsp; map.on("layers-add-result", function (evt) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var layerInfo = arrayUtils.map(evt.layers, function (layer, index) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return {layer:layer.layer, title:layer.layer.name};&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (layerInfo.length &amp;gt; 0) {&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var legendDijit = new Legend({&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map: map,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerInfos: layerInfo&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }, "legendDiv");&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; legendDijit.startup();&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 10:28:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-javascript-api-legend-and-checkbox/m-p/223289#M20749</guid>
      <dc:creator>HabG_</dc:creator>
      <dc:date>2014-10-01T10:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JavaScript API: Legend and checkbox</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-javascript-api-legend-and-checkbox/m-p/223290#M20750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Hab,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://jsfiddle.net/hgetg9Ls/"&gt;Here &lt;/A&gt;is an example you can refer to that has an ArcGISDynamicServiceLayer in the legend, and a checkbox next to each layer to toggle it on/off.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 12:24:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-javascript-api-legend-and-checkbox/m-p/223290#M20750</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2014-10-01T12:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JavaScript API: Legend and checkbox</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-javascript-api-legend-and-checkbox/m-p/223291#M20751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jake.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Oct 2014 13:08:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-javascript-api-legend-and-checkbox/m-p/223291#M20751</guid>
      <dc:creator>HabG_</dc:creator>
      <dc:date>2014-10-01T13:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JavaScript API: Legend and checkbox</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-javascript-api-legend-and-checkbox/m-p/223292#M20752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using this code below in a file mapOverlay.html but it does not work. Could you give me any suggestion? I don't know what template my application was developed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;!-- SidePanel --&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;div id="sidepanel" style="position:absolute;left:3px;top:3px;z-index:40;"&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;div style="position:absolute;left:3px;top:3px;z-index:40;"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;div data-dojo-type="dijit/layout/TabContainer" style="width: 320px; height: 100px;" id="TOCdiv" class="dbootstrap"&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div data-dojo-type="dijit/layout/ContentPane" title="Temas" id="temas"&amp;gt; &amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div data-dojo-type="dijit/layout/ContentPane" title="Legendas" data-dojo-props="title:'Legend'"&amp;gt; &amp;lt;/div&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;/div&amp;gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See attached image.&lt;IMG alt="SidePanel.png" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/28211_SidePanel.png" style="width: 620px; height: 265px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Map.png" class="jive-image image-2" src="https://community.esri.com/legacyfs/online/28212_Map.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Nov 2014 17:47:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-javascript-api-legend-and-checkbox/m-p/223292#M20752</guid>
      <dc:creator>EzequiasRodrigues_da_Rocha1</dc:creator>
      <dc:date>2014-11-07T17:47:41Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS JavaScript API: Legend and checkbox</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-javascript-api-legend-and-checkbox/m-p/1104556#M74873</link>
      <description>&lt;P&gt;Jake, I know this is quite old but figured I would give this a shot in asking a question.&amp;nbsp; Can you put a legend under each checkbox as they are checked.&amp;nbsp; I don't want a different tab to show the legend I was users to see the legend for that particular layer as they turn the layer on and off underneath it.&amp;nbsp; Thanks and hopefully you get this reply.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Oct 2021 20:09:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/arcgis-javascript-api-legend-and-checkbox/m-p/1104556#M74873</guid>
      <dc:creator>JohnRitsko1</dc:creator>
      <dc:date>2021-10-04T20:09:18Z</dc:date>
    </item>
  </channel>
</rss>

