<?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 Loading... message - what event to connect to? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loading-message-what-event-to-connect-to/m-p/118964#M11041</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Comrades,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm creating an application based on the JavaScript API Viewer sample. I have a simple GIF that displays a Loading... message that I wish to hide after all the map layers display on-screen. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried to tie hiding the message to various events and they all fire too soon for my dynamic ArcSDE-based service which can take as long as 5 seconds on average to appear. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tested connecting hiding the message to 1) map onLoad 2) map onLayerAdd 3) layer onLoad and 4) layer onUpdate and all these events seem to fire too soon. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm specifically looking for an event that screams 'I am all done and the map is completely displayed'. But what event is that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jim G.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GIS Specialist, Mn Dept of Agriculture&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Apr 2010 12:15:13 GMT</pubDate>
    <dc:creator>JamesGonsoski</dc:creator>
    <dc:date>2010-04-07T12:15:13Z</dc:date>
    <item>
      <title>Loading... message - what event to connect to?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loading-message-what-event-to-connect-to/m-p/118964#M11041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Comrades,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm creating an application based on the JavaScript API Viewer sample. I have a simple GIF that displays a Loading... message that I wish to hide after all the map layers display on-screen. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried to tie hiding the message to various events and they all fire too soon for my dynamic ArcSDE-based service which can take as long as 5 seconds on average to appear. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tested connecting hiding the message to 1) map onLoad 2) map onLayerAdd 3) layer onLoad and 4) layer onUpdate and all these events seem to fire too soon. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm specifically looking for an event that screams 'I am all done and the map is completely displayed'. But what event is that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jim G.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GIS Specialist, Mn Dept of Agriculture&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Apr 2010 12:15:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loading-message-what-event-to-connect-to/m-p/118964#M11041</guid>
      <dc:creator>JamesGonsoski</dc:creator>
      <dc:date>2010-04-07T12:15:13Z</dc:date>
    </item>
    <item>
      <title>Loading... message - what event to connect to?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loading-message-what-event-to-connect-to/m-p/118965#M11042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;For what it's worth, after a another day's worth of experimenting, I solved my problem by:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. After the map successfully loads, I use a &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;dojo.connect&lt;/SPAN&gt;&lt;SPAN&gt; to tie &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;displaying &lt;/SPAN&gt;&lt;SPAN&gt;the &lt;/SPAN&gt;&lt;STRONG&gt;Loading...&lt;/STRONG&gt;&lt;SPAN&gt; message to the map 'onExtentChange' event. That particular event avoids needless message displays while layers are merely being turned on and off.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. After the last dynamic layer is loaded, I use a &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;dojo.connect&lt;/SPAN&gt;&lt;SPAN&gt; to tie &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;hiding &lt;/SPAN&gt;&lt;SPAN&gt;the &lt;/SPAN&gt;&lt;STRONG&gt;Loading...&lt;/STRONG&gt;&lt;SPAN&gt; message to the last layer's 'onUpdate' event. Since this layer is usually the slowest to load, it's normally the last event to fire.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The tricky bit is figuring out which of the layers being loaded through a configuration file is the 'last dynamic layer', but that's another story.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Apr 2010 14:41:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loading-message-what-event-to-connect-to/m-p/118965#M11042</guid>
      <dc:creator>JamesGonsoski</dc:creator>
      <dc:date>2010-04-08T14:41:42Z</dc:date>
    </item>
    <item>
      <title>Loading... message - what event to connect to?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loading-message-what-event-to-connect-to/m-p/118966#M11043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Oh...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Did I forget to mention that the last layer needs to be visible? As Kelly has noted in other forum posts, the layer onUpdate event only fires if the layer is visible.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Apr 2010 14:52:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/loading-message-what-event-to-connect-to/m-p/118966#M11043</guid>
      <dc:creator>JamesGonsoski</dc:creator>
      <dc:date>2010-04-08T14:52:01Z</dc:date>
    </item>
  </channel>
</rss>

