<?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: Issues with ToC loading in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-with-toc-loading/m-p/130792#M12144</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to initialize the TOC after the map and the IBSS layer are ready. I've always put that into the map's "layers-add-result" event. Don't use the "layer-add-result" event, since this can get fired multiple times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;map.addLayers([IBSS]);

map.on("layers-add-result", function () {
&amp;nbsp;&amp;nbsp;&amp;nbsp; toc = new agsjs.dijit.TOC({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map: map,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerInfos: [{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer: IBSS,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; title: "Southeast Data Layers"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }]
&amp;nbsp;&amp;nbsp;&amp;nbsp; }, 'tocDiv');
};&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 07:21:23 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2021-12-11T07:21:23Z</dc:date>
    <item>
      <title>Issues with ToC loading</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-with-toc-loading/m-p/130786#M12138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using this code: &lt;A href="https://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109" title="https://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109"&gt;https://www.arcgis.com/home/item.html?id=9b6280a6bfb0430f8d1ebc969276b109&lt;/A&gt; for a Table of Contents in my application. I'm using an older version of the API (3.5). I have been working on making my app work in Web App Builder so I haven't touched the code on the Javascript API version in a few months. I noticed yesterday the ToC wasn't loading properly. I turned on Firebug and got an error I can't really interpret. I also got some in Chrome as well. I've attached the images of the errors below. Anyone have any insight? I know it was working recently. Again, I haven't touched any of the code in months so something has happened I'm just not sure what. I was hoping that this application would be working for a presentation I have next week so any help to get this working again would be great. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="IMS.JPG" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/150632_IMS.JPG" style="width: 620px; height: 49px;" /&gt;&lt;IMG alt="IMS2.JPG" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/150633_IMS2.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2015 20:27:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-with-toc-loading/m-p/130786#M12138</guid>
      <dc:creator>JessicaKnight1</dc:creator>
      <dc:date>2015-12-01T20:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with ToC loading</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-with-toc-loading/m-p/130787#M12139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Jessica,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It might be helpful if we could see your code, it is tough to troubleshoot with only seeing the error message. &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2015 20:29:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-with-toc-loading/m-p/130787#M12139</guid>
      <dc:creator>TimWitt2</dc:creator>
      <dc:date>2015-12-01T20:29:58Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with ToC loading</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-with-toc-loading/m-p/130788#M12140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I saw something like this yesterday. That user does not have access to that ncsu service. Are you able to open that service on arcgis online outside of your application?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Dec 2015 20:51:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-with-toc-loading/m-p/130788#M12140</guid>
      <dc:creator>TyroneBiggums</dc:creator>
      <dc:date>2015-12-01T20:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with ToC loading</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-with-toc-loading/m-p/130789#M12141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have attached my code. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All of this is done through ArcServer. I don't have it pulling from ArcGIS Online at all. I do have a version running on WAB, but they aren't connected to each other. Everything about the app in the API functions properly except the ToC right now. This is how it shows up on my app:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="IMS3.JPG" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/150912_IMS3.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Rather than giving the drop down of layers to select, all I have is the heading. This has how its been showing up in Safari since day one, though its worked fine in Firefox, Chrome, and IE with no issues for the last year or two that I've been working on it. I know it was working a few weeks ago because I used it for some screenshots for another presentation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2015 17:11:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-with-toc-loading/m-p/130789#M12141</guid>
      <dc:creator>JessicaKnight1</dc:creator>
      <dc:date>2015-12-02T17:11:29Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with ToC loading</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-with-toc-loading/m-p/130790#M12142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmm, well what probably happend (not that it's helpful) is that the javascript threw up at that header because of that error and wouldn't continue rendering that bit. Maybe?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe, also, the security of that service has changed since you grabbed a screen capture for your presentation?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why I brought up ArcOnline is to just add a layer with that service to see what happens. It could rule out it being an issue with the actual service is all I meant.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Dec 2015 19:54:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-with-toc-loading/m-p/130790#M12142</guid>
      <dc:creator>TyroneBiggums</dc:creator>
      <dc:date>2015-12-02T19:54:31Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with ToC loading</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-with-toc-loading/m-p/130791#M12143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anyone?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Dec 2015 20:31:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-with-toc-loading/m-p/130791#M12143</guid>
      <dc:creator>JessicaKnight1</dc:creator>
      <dc:date>2015-12-15T20:31:04Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with ToC loading</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-with-toc-loading/m-p/130792#M12144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to initialize the TOC after the map and the IBSS layer are ready. I've always put that into the map's "layers-add-result" event. Don't use the "layer-add-result" event, since this can get fired multiple times.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;map.addLayers([IBSS]);

map.on("layers-add-result", function () {
&amp;nbsp;&amp;nbsp;&amp;nbsp; toc = new agsjs.dijit.TOC({
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map: map,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layerInfos: [{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer: IBSS,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; title: "Southeast Data Layers"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }]
&amp;nbsp;&amp;nbsp;&amp;nbsp; }, 'tocDiv');
};&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:21:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-with-toc-loading/m-p/130792#M12144</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-11T07:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: Issues with ToC loading</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-with-toc-loading/m-p/130793#M12145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My code was working as it was written for the last year or so. I changed it to match this though and no change. In fact, now nothing shows up in the Legend container at all. And Firefox shows no error messages. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm really at a loss. I changed nothing on my code in the last few months and it went from working fine to this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Dec 2015 19:34:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/issues-with-toc-loading/m-p/130793#M12145</guid>
      <dc:creator>JessicaKnight1</dc:creator>
      <dc:date>2015-12-16T19:34:40Z</dc:date>
    </item>
  </channel>
</rss>

