<?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: Progress bar / spinner for performing queries w/ js api 4.x in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/progress-bar-spinner-for-performing-queries-w-js/m-p/1098129#M74668</link>
    <description>&lt;P&gt;Wonderful, thank you so much!&lt;/P&gt;</description>
    <pubDate>Tue, 14 Sep 2021 16:30:57 GMT</pubDate>
    <dc:creator>luckachi</dc:creator>
    <dc:date>2021-09-14T16:30:57Z</dc:date>
    <item>
      <title>Progress bar / spinner for performing queries w/ js api 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/progress-bar-spinner-for-performing-queries-w-js/m-p/1097628#M74647</link>
      <description>&lt;P&gt;I have a data viewer with a few drop downs and buttons that perform different queries (depending on what is selected in the drop down menus) when the search button is clicked. I am looking to add a progress bar, spinner or something on the map that indicates that the query is processing/running but I have not been successful.&lt;/P&gt;&lt;P&gt;The following code does not work as the spinner will remain on the screen the entire time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;        /********************
        * Display the loading indicator when the view is updating
         ********************/

         watchUtils.whenTrue(view, "updating", function(evt) {
           $("#loading").show();
         });

         // Hide the loading indicator when the view stops updating
         watchUtils.whenFalse(view, "updating", function(evt) {
           $("#loading").hide();
         });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have also tried to change "updating" to "animation" but that does not seem to work either. Any suggestions would be appreciated!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 14:40:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/progress-bar-spinner-for-performing-queries-w-js/m-p/1097628#M74647</guid>
      <dc:creator>luckachi</dc:creator>
      <dc:date>2021-09-13T14:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: Progress bar / spinner for performing queries w/ js api 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/progress-bar-spinner-for-performing-queries-w-js/m-p/1097662#M74648</link>
      <description>&lt;P&gt;Odd, that same logics works in this demo.&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/odoe/pen/LYLLXwO" target="_blank"&gt;https://codepen.io/odoe/pen/LYLLXwO&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could be an odd race condition with jQuery, but still odd. You can try using a whenFalseOnce inside the whenTrue method like this demo.&lt;/P&gt;&lt;P&gt;&lt;A href="https://codepen.io/odoe/pen/wveeRew?editors=0010" target="_blank"&gt;https://codepen.io/odoe/pen/wveeRew?editors=0010&lt;/A&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;whenTrue(view, "updating", () =&amp;gt; {
	console.log("updating true")
	loader.active = true;
	whenFalseOnce(view, "updating", () =&amp;gt; {
		console.log("updating false")
		loader.active = false;
	});
});&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 13 Sep 2021 15:33:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/progress-bar-spinner-for-performing-queries-w-js/m-p/1097662#M74648</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-09-13T15:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: Progress bar / spinner for performing queries w/ js api 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/progress-bar-spinner-for-performing-queries-w-js/m-p/1097696#M74651</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384"&gt;@ReneRubalcava&lt;/a&gt;&amp;nbsp;. I will have to take a look at these examples and see if they solve my problem!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 16:33:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/progress-bar-spinner-for-performing-queries-w-js/m-p/1097696#M74651</guid>
      <dc:creator>luckachi</dc:creator>
      <dc:date>2021-09-13T16:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Progress bar / spinner for performing queries w/ js api 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/progress-bar-spinner-for-performing-queries-w-js/m-p/1097709#M74653</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384"&gt;@ReneRubalcava&lt;/a&gt;&amp;nbsp;this seems to do exactly what I needed but when I have a query that takes a bit longer to process, it either displays for a quick second and disappears or it only shows up once the resultsLayer has loaded with the query results. It won't actually display while the query is processing.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 17:15:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/progress-bar-spinner-for-performing-queries-w-js/m-p/1097709#M74653</guid>
      <dc:creator>luckachi</dc:creator>
      <dc:date>2021-09-13T17:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Progress bar / spinner for performing queries w/ js api 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/progress-bar-spinner-for-performing-queries-w-js/m-p/1097711#M74654</link>
      <description>&lt;P&gt;Ah ok. Unless the view or viewlayer initiates the request, updating won't be true until you add results to the map.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What you can do is show the loader just before you make the query, then leave the whenFalse() on the view and it will hide the loader when the results are added to the map and drawn. If you are not displaying results for some reason, you can hide the loader when the results are returned.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 17:26:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/progress-bar-spinner-for-performing-queries-w-js/m-p/1097711#M74654</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-09-13T17:26:19Z</dc:date>
    </item>
    <item>
      <title>Re: Progress bar / spinner for performing queries w/ js api 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/progress-bar-spinner-for-performing-queries-w-js/m-p/1097717#M74656</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384"&gt;@ReneRubalcava&lt;/a&gt;&amp;nbsp;- I will try to make these changes and see what happens! I appreciate the help.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Sep 2021 18:05:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/progress-bar-spinner-for-performing-queries-w-js/m-p/1097717#M74656</guid>
      <dc:creator>luckachi</dc:creator>
      <dc:date>2021-09-13T18:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Progress bar / spinner for performing queries w/ js api 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/progress-bar-spinner-for-performing-queries-w-js/m-p/1098054#M74664</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/7384"&gt;@ReneRubalcava&lt;/a&gt;&amp;nbsp;- thank you for the help, I was able to get the loader to show during the queries, etc. I did have one question however, is there a way to center the loader in the map versus adding it to the ui in the specific corners? Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 14:28:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/progress-bar-spinner-for-performing-queries-w-js/m-p/1098054#M74664</guid>
      <dc:creator>luckachi</dc:creator>
      <dc:date>2021-09-14T14:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Progress bar / spinner for performing queries w/ js api 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/progress-bar-spinner-for-performing-queries-w-js/m-p/1098078#M74666</link>
      <description>&lt;P&gt;You can add it via the "manual" option mentioned in the doc here.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-DefaultUI.html#add" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/api-reference/esri-views-ui-DefaultUI.html#add&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You'll probably need to wrap it in another div and center it like shown here.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/CSS/Layout_cookbook/Center_an_element" target="_blank"&gt;https://developer.mozilla.org/en-US/docs/Web/CSS/Layout_cookbook/Center_an_element&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 15:09:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/progress-bar-spinner-for-performing-queries-w-js/m-p/1098078#M74666</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-09-14T15:09:35Z</dc:date>
    </item>
    <item>
      <title>Re: Progress bar / spinner for performing queries w/ js api 4.x</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/progress-bar-spinner-for-performing-queries-w-js/m-p/1098129#M74668</link>
      <description>&lt;P&gt;Wonderful, thank you so much!&lt;/P&gt;</description>
      <pubDate>Tue, 14 Sep 2021 16:30:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/progress-bar-spinner-for-performing-queries-w-js/m-p/1098129#M74668</guid>
      <dc:creator>luckachi</dc:creator>
      <dc:date>2021-09-14T16:30:57Z</dc:date>
    </item>
  </channel>
</rss>

