<?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 Getting layers in CheckBox Selection in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-layers-in-checkbox-selection/m-p/98962#M9072</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have 4 MXDs and each has more than 10 layers. Now when I add them using the ArcGISDynamicMapLayers, I am only able to add the Map Service but I wish to display the layers with the check box. How can I do that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It should look something like &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://i.imgur.com/VuYhu.png" rel="nofollow" target="_blank"&gt;this&lt;/A&gt;&lt;SPAN&gt;. The Federal Funding and Economy are the Map Service and the Growth, Income and other are the layers within Economy Map Service. This image is how it was implemented in Flex, how can I implement it in JavaScript?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 06 Nov 2012 17:10:34 GMT</pubDate>
    <dc:creator>SmaranHarihar</dc:creator>
    <dc:date>2012-11-06T17:10:34Z</dc:date>
    <item>
      <title>Getting layers in CheckBox Selection</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-layers-in-checkbox-selection/m-p/98962#M9072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have 4 MXDs and each has more than 10 layers. Now when I add them using the ArcGISDynamicMapLayers, I am only able to add the Map Service but I wish to display the layers with the check box. How can I do that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It should look something like &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://i.imgur.com/VuYhu.png" rel="nofollow" target="_blank"&gt;this&lt;/A&gt;&lt;SPAN&gt;. The Federal Funding and Economy are the Map Service and the Growth, Income and other are the layers within Economy Map Service. This image is how it was implemented in Flex, how can I implement it in JavaScript?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Nov 2012 17:10:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-layers-in-checkbox-selection/m-p/98962#M9072</guid>
      <dc:creator>SmaranHarihar</dc:creator>
      <dc:date>2012-11-06T17:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Getting layers in CheckBox Selection</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-layers-in-checkbox-selection/m-p/98963#M9073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I created something similar using this sample - &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/map_dynamiclayerlist.html"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/map_dynamiclayerlist.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I also found a variation of this sample that was helpful - &lt;/SPAN&gt;&lt;A href="http://maps.roktech.net/demo/toc_example/index.htm"&gt;http://maps.roktech.net/demo/toc_example/index.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;hope that helps&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Nov 2012 20:22:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-layers-in-checkbox-selection/m-p/98963#M9073</guid>
      <dc:creator>VernWolfley</dc:creator>
      <dc:date>2012-11-13T20:22:00Z</dc:date>
    </item>
    <item>
      <title>Re: Getting layers in CheckBox Selection</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-layers-in-checkbox-selection/m-p/98964#M9074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I created something similar using this sample - &lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/map_dynamiclayerlist.html" rel="nofollow" target="_blank"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/map_dynamiclayerlist.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I also found a variation of this sample that was helpful - &lt;A class="jive-link-external-small" href="http://maps.roktech.net/demo/toc_example/index.htm" rel="nofollow" target="_blank"&gt;http://maps.roktech.net/demo/toc_example/index.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;hope that helps&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the reply. I tried a different technique,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;for (var i=0; i&amp;lt;ddMapServ.length; i++) { &amp;nbsp;&amp;nbsp; var url = ddMapServ&lt;I&gt;; &amp;nbsp;&amp;nbsp; var requestHandle = esri.request({ &amp;nbsp;&amp;nbsp;&amp;nbsp; "url": url, &amp;nbsp;&amp;nbsp;&amp;nbsp; "content": { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "f": "json" &amp;nbsp;&amp;nbsp;&amp;nbsp; }, &amp;nbsp;&amp;nbsp;&amp;nbsp; "callbackParamName": "callback" &amp;nbsp;&amp;nbsp;&amp;nbsp; }) &amp;nbsp;&amp;nbsp; requestHandle.then(requestSucceeded, requestFailed); &amp;nbsp; }&lt;/I&gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where the ddMapServ is the array of MapService whose layer I want to fetch.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;function requestSucceeded(response, io) { &amp;nbsp;&amp;nbsp; if (response.hasOwnProperty("layers") ) { &amp;nbsp;&amp;nbsp;&amp;nbsp; var lyr=[]; &amp;nbsp;&amp;nbsp;&amp;nbsp; dojo.map(response.layers, function(f) { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lyr.push(f.name); &amp;nbsp;&amp;nbsp;&amp;nbsp; }); &amp;nbsp;&amp;nbsp;&amp;nbsp; ddLyrName.push(lyr); &amp;nbsp;&amp;nbsp; } &amp;nbsp; }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Nov 2012 14:05:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/getting-layers-in-checkbox-selection/m-p/98964#M9074</guid>
      <dc:creator>SmaranHarihar</dc:creator>
      <dc:date>2012-11-15T14:05:14Z</dc:date>
    </item>
  </channel>
</rss>

