<?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 Event to know when a layer loading is complete in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/event-to-know-when-a-layer-loading-is-complete/m-p/442885#M10293</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using Flex 4. I have loaded a dynamic layer to map, but the visibility is set to false at the beginning. When I set the layer's visibility to true, it take several seconds before we see the layer. While waiting, I want set the Cursor as busy style. After it is completely done, I want to set Cursor back to normal style. How can I capture the Event, such map.addEventListener and map.removeEventlistener? The codes are not in a widget. Thanks a lot!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 08 Oct 2012 23:30:24 GMT</pubDate>
    <dc:creator>XintaoLiu</dc:creator>
    <dc:date>2012-10-08T23:30:24Z</dc:date>
    <item>
      <title>Event to know when a layer loading is complete</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/event-to-know-when-a-layer-loading-is-complete/m-p/442885#M10293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using Flex 4. I have loaded a dynamic layer to map, but the visibility is set to false at the beginning. When I set the layer's visibility to true, it take several seconds before we see the layer. While waiting, I want set the Cursor as busy style. After it is completely done, I want to set Cursor back to normal style. How can I capture the Event, such map.addEventListener and map.removeEventlistener? The codes are not in a widget. Thanks a lot!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Oct 2012 23:30:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/event-to-know-when-a-layer-loading-is-complete/m-p/442885#M10293</guid>
      <dc:creator>XintaoLiu</dc:creator>
      <dc:date>2012-10-08T23:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: Event to know when a layer loading is complete</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/event-to-know-when-a-layer-loading-is-complete/m-p/442886#M10294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;A class="jive-link-external-small" href="http://forums.arcgis.com/threads/16708-Event-thrown-when-map-is-FINISHED-loading?p=192297#post192297" rel="nofollow" target="_blank"&gt;Similar task&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Layer is loaded and shown to client:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LayerEvent.LOAD = added to map&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LayerEvent.UPDATE_START = recieved new data, starting update layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;LayerEvent.UPDATE_END = layer updated&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;protected function onLayerUpdateStart(event:LayerEvent):void { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // remove this listener if you need it only 1 time - first layer update &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // yourLayer.removeEventListener(LayerEvent.UPDATE_START, onLayerUpdateStart);&amp;nbsp; trace("&amp;gt;&amp;gt;&amp;gt; Layer id='" + event.layer.id + "' update started"); &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cursorManager.setBusyCursor(); // or show any own busy dialog }&amp;nbsp; protected function onLayerUpdateEnd(event:LayerEvent):void { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // remove this listener if you need it only 1 time - first layer update &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // yourLayer.removeEventListener(LayerEvent.UPDATE_END, onLayerUpdateEnd);&amp;nbsp; trace("&amp;gt;&amp;gt;&amp;gt; Layer id='" + event.layer.id + "' update ended");&amp;nbsp; cursorManager.removeBusyCursor(); }&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;right?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Oct 2012 05:17:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/event-to-know-when-a-layer-loading-is-complete/m-p/442886#M10294</guid>
      <dc:creator>IvanBespalov</dc:creator>
      <dc:date>2012-10-09T05:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: Event to know when a layer loading is complete</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/event-to-know-when-a-layer-loading-is-complete/m-p/442887#M10295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;A href="http://forums.arcgis.com/threads/16708-Event-thrown-when-map-is-FINISHED-loading?p=192297#post192297" rel="nofollow noopener noreferrer" target="_blank"&gt;Similar task&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Layer is loaded and shown to client:&lt;BR /&gt;LayerEvent.LOAD = added to map&lt;BR /&gt;LayerEvent.UPDATE_START = recieved new data, starting update layer&lt;BR /&gt;LayerEvent.UPDATE_END = layer updated&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;protected function onLayerUpdateStart(event:LayerEvent):void
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // remove this listener if you need it only 1 time - first layer update
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // yourLayer.removeEventListener(LayerEvent.UPDATE_START, onLayerUpdateStart);
 trace("&amp;gt;&amp;gt;&amp;gt; Layer id='" + event.layer.id + "' update started");
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cursorManager.setBusyCursor(); // or show any own busy dialog
}

protected function onLayerUpdateEnd(event:LayerEvent):void
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // remove this listener if you need it only 1 time - first layer update
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // yourLayer.removeEventListener(LayerEvent.UPDATE_END, onLayerUpdateEnd);
 trace("&amp;gt;&amp;gt;&amp;gt; Layer id='" + event.layer.id + "' update ended");
 cursorManager.removeBusyCursor();
}&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;right?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, it works perfectly, thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 19:48:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/event-to-know-when-a-layer-loading-is-complete/m-p/442887#M10295</guid>
      <dc:creator>XintaoLiu</dc:creator>
      <dc:date>2021-12-11T19:48:22Z</dc:date>
    </item>
  </channel>
</rss>

