<?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: TOC &amp;amp; Map Layers in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468140#M13298</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Faizan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Look here: &lt;/SPAN&gt;&lt;A href="http://www.arcgis.com/home/item.html?id=e2cb71d5c04d40d19e9f945ae0db7ce8"&gt;http://www.arcgis.com/home/item.html?id=e2cb71d5c04d40d19e9f945ae0db7ce8&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Mar 2011 11:01:39 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2011-03-14T11:01:39Z</dc:date>
    <item>
      <title>TOC &amp;amp; Map Layers</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468134#M13292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using Robert's TOC for Flex View 1.3 which handles scale dependency. It works great however, sometimes (not always) on loading the site, one or two mapservices/map layers in the TOC do not have the (+ tree node expander) in front of them (to display the layers contained in that map service). In other words, i think, the mapservice doesnt load (for reasons i am still not sure about as it happens only sometimes on initial loading or even on refreshing the webbrowser), hence the code which is rendering the TOC items doesnt work. Is there any way to ensure that all layers have been loaded before being rendered (in the TOC) else wait for all layers to finish loading? It might also be the case that the layers are loaded on the map but the rendering is not working?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas on how to sort this out.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2011 09:47:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468134#M13292</guid>
      <dc:creator>FaizanTayyab</dc:creator>
      <dc:date>2011-03-01T09:47:52Z</dc:date>
    </item>
    <item>
      <title>Re: TOC &amp; Map Layers</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468135#M13293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Faizan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; That code for 1.3 has been out there for a VERY long time and I have had no reports of this behavior. The first thing I would do is switch back to the standard TOC and test for some length of time to see if it exhibits the same behavior. It sounds more like you have some slow map services that are causing the issue.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2011 11:39:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468135#M13293</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-03-01T11:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: TOC &amp; Map Layers</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468136#M13294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Actually, i took over the project from a previous developer who although created the TOC but was not able to sort out the scale dependency stuff. His scale dependecy code seemed to work sometimes but usually falls over with all checkbox greying out at all scales (on extent change or simple first loading or even on refresh)&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;At that point i added your code and was able to make it work perfectly but this also introduced the problem i outlined earlier.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Although the previous developer's code, didnt work properly with scales, it never had the problem i am experiencing now. His code does show all layers (map services) in the TOC even the really big ones which take time to load, initially the slow loading layers (map service) wouldnt have the + sign in front of them but after some wait it does appear.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now my issue is that the code i used, actually never seem to show the + sign in front of the slow loading map services. I even removed the slow loading map service and strangely it shows same behaviour for very simple map services as well (i.e, it doesnt show the + sign in front of the map service, but as i mentioned, this doesnt happen always).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried the standard TOC code as you advised and it functions fine. I have also simplified some complex map services and now all layers are loaded and rendered fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am assuming the moment i will add the scale dependecy code, it will cause problems as before. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2011 13:00:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468136#M13294</guid>
      <dc:creator>FaizanTayyab</dc:creator>
      <dc:date>2011-03-01T13:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: TOC &amp; Map Layers</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468137#M13295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;After installing the debugged version of flash player, i am getting:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;TypeError: Error #1009: Cannot access a property or method of a null object reference.
 at com.esri.solutions.flexviewer.widgets::LiveMapsWidget/updateTOCBoxes()&lt;C&gt;
 at com.esri.solutions.flexviewer.widgets::LiveMapsWidget/getMasterDetailsResult()&lt;C&gt;
 at mx.rpc::Responder/result()&lt;C&gt;
 at com.esri.ags.tasks::LayerDetailsTask/handleDecodedObject()&lt;C&gt;
 at Function/http://adobe.com/AS3/2006/builtin::call()
 at com.esri.ags.tasks::BaseTask/handleResult()&lt;C&gt;
 at Function/&amp;lt;anonymous&amp;gt;()&lt;C&gt;
 at mx.rpc::Responder/result()&lt;C&gt;
 at mx.rpc::AsyncToken/http://www.adobe.com/2006/flex/mx/internal::applyResult()&lt;C&gt;
 at mx.rpc.events::ResultEvent/http://www.adobe.com/2006/flex/mx/internal::callTokenResponders()&lt;C&gt;
 at HTTPOperation/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()&lt;C&gt;
 at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()&lt;C&gt;
 at mx.rpc::Responder/result()&lt;C&gt;
 at mx.rpc::AsyncRequest/acknowledge()&lt;C&gt;
 at DirectHTTPMessageResponder/completeHandler()&lt;C&gt;
 at flash.events::EventDispatcher/dispatchEventFunction()
 at flash.events::EventDispatcher/dispatchEvent()
 at flash.net::URLLoader/onComplete()
&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/C&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Although, with this error, the + sign still displays, it is only sometimes that the + sign (layer doesnt load).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:45:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468137#M13295</guid>
      <dc:creator>FaizanTayyab</dc:creator>
      <dc:date>2021-12-11T20:45:10Z</dc:date>
    </item>
    <item>
      <title>Re: TOC &amp; Map Layers</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468138#M13296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Faizan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; I am sorry I just don't have time to support code that is not mine. I don't have a getMasterDetailsResult function in my code. I am just to busy supporting the current release of the FlexViewer and all my new widgets.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Mar 2011 18:12:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468138#M13296</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-03-03T18:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: TOC &amp; Map Layers</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468139#M13297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Thanks for the reply. I believe i took the code from a forum where you provided the answer related to TOC and Map Layers. If this code is not completely yours, can you please provide a link for your scale dependent TOC and also the live map layers widgets. I would then test to see if the same problem occurs or not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Many Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Faizan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2011 08:18:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468139#M13297</guid>
      <dc:creator>FaizanTayyab</dc:creator>
      <dc:date>2011-03-14T08:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: TOC &amp; Map Layers</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468140#M13298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Faizan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Look here: &lt;/SPAN&gt;&lt;A href="http://www.arcgis.com/home/item.html?id=e2cb71d5c04d40d19e9f945ae0db7ce8"&gt;http://www.arcgis.com/home/item.html?id=e2cb71d5c04d40d19e9f945ae0db7ce8&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2011 11:01:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468140#M13298</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-03-14T11:01:39Z</dc:date>
    </item>
    <item>
      <title>Re: TOC &amp; Map Layers</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468141#M13299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the link. i assume it is for 2.x only whereas i am working on 1.3.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2011 11:16:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468141#M13299</guid>
      <dc:creator>FaizanTayyab</dc:creator>
      <dc:date>2011-03-14T11:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: TOC &amp; Map Layers</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468142#M13300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Faizan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Yep I am only supporting 2.x widgets now.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2011 12:08:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468142#M13300</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-03-14T12:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: TOC &amp; Map Layers</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468143#M13301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks, but do you have link to your 1.3 code.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2011 12:15:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468143#M13301</guid>
      <dc:creator>FaizanTayyab</dc:creator>
      <dc:date>2011-03-14T12:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: TOC &amp; Map Layers</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468144#M13302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Faizan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Maybe this is what you are looking for:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://arcscripts.esri.com/details.asp?dbid=16239"&gt;http://arcscripts.esri.com/details.asp?dbid=16239&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2011 12:22:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/toc-amp-amp-map-layers/m-p/468144#M13302</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2011-03-14T12:22:43Z</dc:date>
    </item>
  </channel>
</rss>

