<?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: API for JS: How to know when a graphicsLayer's drawing is done? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-for-js-how-to-know-when-a-graphicslayer-s/m-p/111829#M10422</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the advice, Ken, I have tried this method, but as &lt;A href="https://community.esri.com/people/fcbassongis"&gt;fcbassongis&lt;/A&gt;‌ mentioned, the update events fire only when the viewport changes, so it is not working for my case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Dec 2016 02:13:21 GMT</pubDate>
    <dc:creator>JackyCai</dc:creator>
    <dc:date>2016-12-07T02:13:21Z</dc:date>
    <item>
      <title>API for JS: How to know when a graphicsLayer's drawing is done?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-for-js-how-to-know-when-a-graphicslayer-s/m-p/111825#M10418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I am trying to do is to keep the loading icon until the drawing on the map is done, and I am using GraphicsLayer to display the features.&amp;nbsp;I have tried to use map and layer events including "load", "update", "update-start", "update-end", during the process&amp;nbsp;I&amp;nbsp;clear all the graphics and add new graphics, but none of these events above is triggered.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have a solution for this? Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 07:16:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-for-js-how-to-know-when-a-graphicslayer-s/m-p/111825#M10418</guid>
      <dc:creator>JackyCai</dc:creator>
      <dc:date>2016-12-06T07:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: API for JS: How to know when a graphicsLayer's drawing is done?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-for-js-how-to-know-when-a-graphicslayer-s/m-p/111826#M10419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you defined the "load" event listener before adding the layer to the map (&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jsapi/graphicslayer-amd.html#event-load" title="https://developers.arcgis.com/javascript/3/jsapi/graphicslayer-amd.html#event-load"&gt;GraphicsLayer | API Reference | ArcGIS API for JavaScript 3.18&lt;/A&gt;&amp;nbsp;)? &amp;nbsp;As for update event listeners, they only fire when the viewport changes. &amp;nbsp;Otherwise, if it an issue of waiting for the API to draw a lot of features and the browser "hangs", have a look at the graphic-add event (&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/3/jsapi/graphicslayer-amd.html#event-graphic-add" title="https://developers.arcgis.com/javascript/3/jsapi/graphicslayer-amd.html#event-graphic-add"&gt;GraphicsLayer | API Reference | ArcGIS API for JavaScript 3.18&lt;/A&gt;&amp;nbsp;) - you could set a timeout handler after a graphic has been added and then just hide the loading icon after all the graphics have been added.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 08:56:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-for-js-how-to-know-when-a-graphicslayer-s/m-p/111826#M10419</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2016-12-06T08:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: API for JS: How to know when a graphicsLayer's drawing is done?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-for-js-how-to-know-when-a-graphicslayer-s/m-p/111827#M10420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is how I turn on and off the loading icon ("loadingImg") when a layer is updating.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;loading &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; dom&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;byId&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"loadingImg"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

myLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;on&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"update-start"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; domUtils&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;show&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;loading&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

myLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;on&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"update-end"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;event&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; domUtils&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;hide&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;loading&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;error &lt;SPAN class="operator token"&gt;!==&lt;/SPAN&gt; undefined&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; console&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;log&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Update complete with error: "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; event&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;error&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:42:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-for-js-how-to-know-when-a-graphicslayer-s/m-p/111827#M10420</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2021-12-11T06:42:05Z</dc:date>
    </item>
    <item>
      <title>Re: API for JS: How to know when a graphicsLayer's drawing is done?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-for-js-how-to-know-when-a-graphicslayer-s/m-p/111828#M10421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! It solves my problem perfectly. I thought of this method, but was thinking&amp;nbsp;that the drawing time after the graphic is added might vary when there are too many graphics, but the fact is that it works pretty well!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 02:10:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-for-js-how-to-know-when-a-graphicslayer-s/m-p/111828#M10421</guid>
      <dc:creator>JackyCai</dc:creator>
      <dc:date>2016-12-07T02:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: API for JS: How to know when a graphicsLayer's drawing is done?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-for-js-how-to-know-when-a-graphicslayer-s/m-p/111829#M10422</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the advice, Ken, I have tried this method, but as &lt;A href="https://community.esri.com/people/fcbassongis"&gt;fcbassongis&lt;/A&gt;‌ mentioned, the update events fire only when the viewport changes, so it is not working for my case.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 02:13:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-for-js-how-to-know-when-a-graphicslayer-s/m-p/111829#M10422</guid>
      <dc:creator>JackyCai</dc:creator>
      <dc:date>2016-12-07T02:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: API for JS: How to know when a graphicsLayer's drawing is done?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-for-js-how-to-know-when-a-graphicslayer-s/m-p/111830#M10423</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As long as you clear the timeout handler before setting it again it should be fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 06:21:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-for-js-how-to-know-when-a-graphicslayer-s/m-p/111830#M10423</guid>
      <dc:creator>FC_Basson</dc:creator>
      <dc:date>2016-12-07T06:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: API for JS: How to know when a graphicsLayer's drawing is done?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-for-js-how-to-know-when-a-graphicslayer-s/m-p/111831#M10424</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Surely I will, thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Dec 2016 09:03:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/api-for-js-how-to-know-when-a-graphicslayer-s/m-p/111831#M10424</guid>
      <dc:creator>JackyCai</dc:creator>
      <dc:date>2016-12-07T09:03:40Z</dc:date>
    </item>
  </channel>
</rss>

