<?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 Dynamic TOC in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/dynamic-toc/m-p/580982#M16581</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an application with a huge layer tree structure.&amp;nbsp; A user starts by selecting a location and then the relevant layers are added to the map and the user can browse the TOC to toggle them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like the user to view the TOC from the Layer List widget or the Map Switcher widget, however neither will initialize when configData.opLayers is empty.&amp;nbsp; As a result the uninitialized TOC will never show my new layers.&amp;nbsp; So, how can I initialize the TOC in the Map Switcher and Layer List plugins?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note: Adding an operationallayer in config.xml will initialize both, but that's not ideal.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Jul 2012 20:34:34 GMT</pubDate>
    <dc:creator>KennyHoran</dc:creator>
    <dc:date>2012-07-30T20:34:34Z</dc:date>
    <item>
      <title>Dynamic TOC</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/dynamic-toc/m-p/580982#M16581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an application with a huge layer tree structure.&amp;nbsp; A user starts by selecting a location and then the relevant layers are added to the map and the user can browse the TOC to toggle them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like the user to view the TOC from the Layer List widget or the Map Switcher widget, however neither will initialize when configData.opLayers is empty.&amp;nbsp; As a result the uninitialized TOC will never show my new layers.&amp;nbsp; So, how can I initialize the TOC in the Map Switcher and Layer List plugins?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note: Adding an operationallayer in config.xml will initialize both, but that's not ideal.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2012 20:34:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/dynamic-toc/m-p/580982#M16581</guid>
      <dc:creator>KennyHoran</dc:creator>
      <dc:date>2012-07-30T20:34:34Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic TOC</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/dynamic-toc/m-p/580983#M16582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;As you said, you could add an operational layer with alpha="0.0" and exclude from the TOC.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This would initialize, but would never be visible to the user.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm sure there is a more "proper" way to do this, but, this is ESRI afterall, so thought I'd chime in with a potential "work around" &lt;span class="lia-unicode-emoji" title=":face_with_open_mouth:"&gt;😮&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;R_&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2012 21:32:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/dynamic-toc/m-p/580983#M16582</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2012-07-30T21:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamic TOC</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/dynamic-toc/m-p/580984#M16583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Aw, play nice!&amp;nbsp; That did work well though, I hadn't considered excluding my only layer.&amp;nbsp; That causes the TOCs to initialize and display a blank menu.&amp;nbsp; I just wish I had a bit more control and with that in mind I have two suggestions for ESRI.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Always initialize the TOC and have a configurable default message for when it's blank. -or-&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Allow the TOC to be initialized on request.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Jul 2012 22:18:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/dynamic-toc/m-p/580984#M16583</guid>
      <dc:creator>KennyHoran</dc:creator>
      <dc:date>2012-07-30T22:18:48Z</dc:date>
    </item>
  </channel>
</rss>

