<?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 Technique for telling when the map has finished loading in the browser. in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/technique-for-telling-when-the-map-has-finished/m-p/593621#M13292</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you are using Tiled Service Layers, you'll want to listen on the LayerEvent.TILES_UPDATED event.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you have more than one layer in your application, you'll want to do a count of when each update completes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is code I use to track if layers are loading.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[PHP]&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;protected var _serviceCount:int = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;protected var _currCount:int = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// Cycle through your map.layers property and send each on to&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// this method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;protected function mapListeners(layer:Layer):void&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Note, visible matters to get a correct count.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (layer is ArcGISDynamicMapServiceLayer &amp;amp;&amp;amp; layer.visible == true)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _serviceCount++;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer.addEventListener(Event.COMPLETE, onServiceIsLoading, false, 0, true);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (layer is ArcGISTiledMapServiceLayer &amp;amp;&amp;amp; layer.visible == true)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _serviceCount++;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer.addEventListener(LayerEvent.TILES_UPDATED, onServiceIsLoading, false, 0, true);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;protected function onServiceIsLoading(event:Event):void&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _currCount++;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; trace("currcount: " + _currCount);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; trace("servicecount: " + _serviceCount);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (_currCount == _serviceCount)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; isLayerLoading = false; // I bind this to a message of some sort&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _currCount = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}[/PHP]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Apr 2010 15:58:29 GMT</pubDate>
    <dc:creator>ReneRubalcava</dc:creator>
    <dc:date>2010-04-20T15:58:29Z</dc:date>
    <item>
      <title>Technique for telling when the map has finished loading in the browser.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/technique-for-telling-when-the-map-has-finished/m-p/593620#M13291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there a way to determine when the browser has finished rendering the map images after a zoom-in or out? I want&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to be able to let the user know when the application is still working&amp;nbsp; with a busy cursor or something similar and then remove it when the rendering is done.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The Event.Complete on the map service layers looks like it should work but it doesn't seem to. The map image hasn't finished drawing when that event returns.&amp;nbsp; The complete event says that is "dispatched when the download of the map image is complete". I added listeners for the complete event on each of my mapservice layers (dynamic and tiled) and when all of them complete, the browser is still not quite done with the rendering. Does anyone have a technique for doing this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Apr 2010 20:36:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/technique-for-telling-when-the-map-has-finished/m-p/593620#M13291</guid>
      <dc:creator>BradleyMontgomery</dc:creator>
      <dc:date>2010-04-16T20:36:29Z</dc:date>
    </item>
    <item>
      <title>Technique for telling when the map has finished loading in the browser.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/technique-for-telling-when-the-map-has-finished/m-p/593621#M13292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you are using Tiled Service Layers, you'll want to listen on the LayerEvent.TILES_UPDATED event.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you have more than one layer in your application, you'll want to do a count of when each update completes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is code I use to track if layers are loading.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[PHP]&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;protected var _serviceCount:int = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;protected var _currCount:int = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// Cycle through your map.layers property and send each on to&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;// this method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;protected function mapListeners(layer:Layer):void&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Note, visible matters to get a correct count.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (layer is ArcGISDynamicMapServiceLayer &amp;amp;&amp;amp; layer.visible == true)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _serviceCount++;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer.addEventListener(Event.COMPLETE, onServiceIsLoading, false, 0, true);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (layer is ArcGISTiledMapServiceLayer &amp;amp;&amp;amp; layer.visible == true)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _serviceCount++;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; layer.addEventListener(LayerEvent.TILES_UPDATED, onServiceIsLoading, false, 0, true);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;protected function onServiceIsLoading(event:Event):void&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _currCount++;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; trace("currcount: " + _currCount);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; trace("servicecount: " + _serviceCount);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (_currCount == _serviceCount)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; isLayerLoading = false; // I bind this to a message of some sort&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _currCount = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}[/PHP]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 15:58:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/technique-for-telling-when-the-map-has-finished/m-p/593621#M13292</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2010-04-20T15:58:29Z</dc:date>
    </item>
    <item>
      <title>Technique for telling when the map images have completed rendering in the browser.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/technique-for-telling-when-the-map-has-finished/m-p/593622#M13293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That' basically what I did too but the problem with that is that those events fire before the images are completely rendered in the browser.&amp;nbsp; So there is still image rendering happening when the busy cursor goes away.&amp;nbsp; It is more noticeable, the more services in your map and the complexity of their features.&amp;nbsp; Do you see that in your app too?&amp;nbsp;&amp;nbsp; I am looking for some event that fires when the images have completed rendering not just when they've been downloaded to the app.&amp;nbsp;&amp;nbsp;&amp;nbsp; Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Apr 2010 18:11:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/technique-for-telling-when-the-map-has-finished/m-p/593622#M13293</guid>
      <dc:creator>BradleyMontgomery</dc:creator>
      <dc:date>2010-04-20T18:11:46Z</dc:date>
    </item>
    <item>
      <title>Technique for telling when the map has finished loading in the browser.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/technique-for-telling-when-the-map-has-finished/m-p/593623#M13294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The tiled layer throws a complete event for each tile. Have you tried switching to the tilesUpdated event on your tiled layers? If yes, can you post your code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Reference:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.esri.com/help/9.3/arcgisserver/apis/flex/apiref/com/esri/ags/layers/TiledMapServiceLayer.html#eventSummary"&gt;http://resources.esri.com/help/9.3/arcgisserver/apis/flex/apiref/com/esri/ags/layers/TiledMapServiceLayer.html#eventSummary&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 01:16:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/technique-for-telling-when-the-map-has-finished/m-p/593623#M13294</guid>
      <dc:creator>DasaPaddock</dc:creator>
      <dc:date>2010-04-21T01:16:25Z</dc:date>
    </item>
    <item>
      <title>Technique for telling when the map has finished rendering  in the browser.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/technique-for-telling-when-the-map-has-finished/m-p/593624#M13295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I tried both the Event.Complete and tilesUpdated events and they both seemed to do the same thing. My code is attached . mapSvcs is just an array of the current mapservices. This technique mostly works but there is some additional rendering or blending that seems to happen in the browser after these events complete. Using this code with a single service, even 2 services, works fine. It's as you add more services and increase the denseness of the features that it seems to take additional time. How do the individual images from each of the ArcGIS services get blended anyway? Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Apr 2010 17:42:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/technique-for-telling-when-the-map-has-finished/m-p/593624#M13295</guid>
      <dc:creator>BradleyMontgomery</dc:creator>
      <dc:date>2010-04-21T17:42:34Z</dc:date>
    </item>
    <item>
      <title>Re: Technique for telling when the map has finished loading in the browser.</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/technique-for-telling-when-the-map-has-finished/m-p/593625#M13296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you ever find a resolution to this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It does seem like the "upon complete" occurs and removes the busy cursor before the display is completely rendered. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Carmen Durham&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Jun 2010 20:03:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/technique-for-telling-when-the-map-has-finished/m-p/593625#M13296</guid>
      <dc:creator>CarmenDurham</dc:creator>
      <dc:date>2010-06-23T20:03:41Z</dc:date>
    </item>
  </channel>
</rss>

