<?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: view updating status stuck on true in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/view-updating-status-stuck-on-true/m-p/500507#M46491</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried your latest codepen a bunch of times, and it worked fine for me every time. Sorry, not sure what else to suggest. If you have the ability, I would recommend contacting Esri Support and see if they are better able to reproduce the issue.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://support.esri.com/en/contact-tech-support" title="https://support.esri.com/en/contact-tech-support"&gt;Esri Support Contact Support&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Nov 2019 23:37:15 GMT</pubDate>
    <dc:creator>Noah-Sager</dc:creator>
    <dc:date>2019-11-05T23:37:15Z</dc:date>
    <item>
      <title>view updating status stuck on true</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/view-updating-status-stuck-on-true/m-p/500502#M46486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to display a loading spinner over my map by watching the updating status on the view. Sometimes this value is stuck on true, so the loading spinner never goes away. I've also noticed that when this happens the loading bar in the layer list widget never goes away either. The network tab in Chrome doesn't show any pending requests.&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;I am using version 4.13 of the JavaScript API and the feature layers are on version 10.51.&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;Below is some pseudo code. I've looked at the updating status of each layer view in the group layer and it is random as to which one gets stuck on true (sometimes it's more than one that gets stuck on true).&amp;nbsp;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;   &lt;P&gt;const pointsLayer = new FeatureLayer({&lt;/P&gt;   &lt;P&gt;&amp;nbsp; url: waterbodyService.points,&lt;BR /&gt;&amp;nbsp; definitionExpression:&amp;nbsp;filter,&lt;BR /&gt;&amp;nbsp; outFields: ['*'],&lt;BR /&gt;&amp;nbsp; renderer: pointsRenderer,&lt;BR /&gt;&amp;nbsp; popupTemplate,&lt;/P&gt;   &lt;P&gt;});&lt;/P&gt;   &lt;P&gt;&lt;/P&gt;   &lt;P&gt;const linesLayer = new FeatureLayer({&lt;/P&gt;   &lt;P&gt;&amp;nbsp; url: waterbodyService.lines,&lt;BR /&gt;&amp;nbsp; definitionExpression:&amp;nbsp;filter,&lt;BR /&gt;&amp;nbsp; outFields: ['*'],&lt;BR /&gt;&amp;nbsp; renderer: linesRenderer,&lt;BR /&gt;&amp;nbsp; popupTemplate,&lt;/P&gt;   &lt;P&gt;});&lt;/P&gt;   &lt;P&gt;&lt;/P&gt;   &lt;P&gt;const areasLayer = new FeatureLayer({&lt;/P&gt;   &lt;P&gt;&amp;nbsp; url: waterbodyService.areas,&lt;BR /&gt;&amp;nbsp; definitionExpression:&amp;nbsp;filter,&lt;BR /&gt;&amp;nbsp; outFields: ['*'],&lt;BR /&gt;&amp;nbsp; renderer: areasRenderer,&lt;BR /&gt;&amp;nbsp; popupTemplate,&lt;/P&gt;   &lt;P&gt;});&lt;/P&gt;   &lt;P&gt;&lt;/P&gt;   &lt;P&gt;const waterbodyLayer = new GroupLayer({&lt;BR /&gt; id: 'waterbodyLayer',&lt;BR /&gt; title: 'Waterbodies',&lt;BR /&gt; listMode: 'hide',&lt;BR /&gt; visible: false,&lt;BR /&gt; });&lt;BR /&gt; waterbodyLayer.addMany([areasLayer, linesLayer, pointsLayer]);&lt;/P&gt;   &lt;P&gt;&lt;/P&gt;   &lt;P&gt;var map = new Map({&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;basemap: "gray"&lt;/P&gt;   &lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;layers: [waterbodyLayer],&lt;BR /&gt; });&lt;/P&gt;   &lt;P&gt;&lt;/P&gt;   &lt;P&gt;var mapView = new MapView({&lt;BR /&gt;&amp;nbsp; container: "viewDiv",&lt;BR /&gt;&amp;nbsp; map: map,&lt;BR /&gt;&amp;nbsp; center: [-117.98118, 34.00679],&lt;BR /&gt;&amp;nbsp; zoom: 10&lt;BR /&gt; });&lt;/P&gt;   &lt;P&gt;&lt;/P&gt;   &lt;P&gt;watchUtils.whenTrue(&lt;SPAN style="background-color: #f6f6f6;"&gt;mapView&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;, 'updating', (updating) =&amp;gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;console.log('whenTrue: ', updating);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;if (!&lt;SPAN style="background-color: #f6f6f6;"&gt;mapView&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;.interacting) setMapLoading(true); // turn off loading spinner&lt;BR /&gt; });&lt;/P&gt;   &lt;P&gt;watchUtils.whenFalse(&lt;SPAN style="background-color: #f6f6f6;"&gt;mapView&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;, 'updating', (updating) =&amp;gt; {&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;console.log('whenFalse: ', updating);&lt;BR /&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;setMapLoading(false); // turn off loading spinner&lt;BR /&gt; });&lt;/P&gt; &lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2019 19:41:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/view-updating-status-stuck-on-true/m-p/500502#M46486</guid>
      <dc:creator>CalebSchwind</dc:creator>
      <dc:date>2019-10-31T19:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: view updating status stuck on true</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/view-updating-status-stuck-on-true/m-p/500503#M46487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Caleb, sorry to hear about the trouble. I tried to make a similar app, but could not reproduce the issue. Is there any commonality, like it only happens at home or at work, or on a certain wifi network, that makes it easier to reproduce? And if you remove the spinner part, do the console.log statements still follow the same pattern?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;test app to repro&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://codepen.io/noash/pen/BaaJpNq" title="https://codepen.io/noash/pen/BaaJpNq"&gt;https://codepen.io/noash/pen/BaaJpNq&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Nov 2019 21:54:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/view-updating-status-stuck-on-true/m-p/500503#M46487</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2019-11-01T21:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: view updating status stuck on true</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/view-updating-status-stuck-on-true/m-p/500504#M46488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Noah,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The console.log statements do follow the same pattern. I will get a true saying the layers are loading, but I never get the false saying the layers finished loading.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I modified your codepen to use feature layers, 4.13 API and added logic for zooming into the extent of the features. It looks like my zoom logic is what is causing the infinite loading spinner issue. This issue is intermittent, so you may need to refresh the page a few times.&amp;nbsp;Is there a better way of zooming to the extent of all of the features that doesn't have this issue?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://codepen.io/cschwind/pen/LYYQrmE" title="https://codepen.io/cschwind/pen/LYYQrmE"&gt;https://codepen.io/cschwind/pen/LYYQrmE&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2019 20:32:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/view-updating-status-stuck-on-true/m-p/500504#M46488</guid>
      <dc:creator>CalebSchwind</dc:creator>
      <dc:date>2019-11-04T20:32:37Z</dc:date>
    </item>
    <item>
      <title>Re: view updating status stuck on true</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/view-updating-status-stuck-on-true/m-p/500505#M46489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looking at the codepen, I see that when the app hangs, there are some requests pending to the f&lt;SPAN style="color: #222222;"&gt;irestore.googleapis.com, which may or may not be related to codepen itself.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222;"&gt;One idea is to wait for the layer to be ready instead of waiting for the view to be ready, like in this example:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222;"&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=featurelayer-queryextent" title="https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=featurelayer-queryextent"&gt;ArcGIS API for JavaScript Sandbox&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222;"&gt;featureLayer.when(function() {&lt;BR /&gt;&amp;nbsp; &amp;nbsp;featureLayer.definitionExpression = createDefinitionExpression("");&lt;BR /&gt;&amp;nbsp; &amp;nbsp;zoomToLayer(featureLayer);&lt;BR /&gt; });&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Nov 2019 21:52:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/view-updating-status-stuck-on-true/m-p/500505#M46489</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2019-11-04T21:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: view updating status stuck on true</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/view-updating-status-stuck-on-true/m-p/500506#M46490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I updated my codepen (&lt;A class="link-titled" href="https://codepen.io/cschwind/pen/LYYQrmE" title="https://codepen.io/cschwind/pen/LYYQrmE"&gt;https://codepen.io/cschwind/pen/LYYQrmE&lt;/A&gt;&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;)&lt;/SPAN&gt; to check the layers prior to zooming and I'm still seeing the&amp;nbsp;same issue.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2019 16:19:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/view-updating-status-stuck-on-true/m-p/500506#M46490</guid>
      <dc:creator>CalebSchwind</dc:creator>
      <dc:date>2019-11-05T16:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: view updating status stuck on true</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/view-updating-status-stuck-on-true/m-p/500507#M46491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried your latest codepen a bunch of times, and it worked fine for me every time. Sorry, not sure what else to suggest. If you have the ability, I would recommend contacting Esri Support and see if they are better able to reproduce the issue.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://support.esri.com/en/contact-tech-support" title="https://support.esri.com/en/contact-tech-support"&gt;Esri Support Contact Support&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Nov 2019 23:37:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/view-updating-status-stuck-on-true/m-p/500507#M46491</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2019-11-05T23:37:15Z</dc:date>
    </item>
  </channel>
</rss>

