<?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: Add graphics to graphics layer after view has finished updating in ArcGIS Experience Builder Questions</title>
    <link>https://community.esri.com/t5/arcgis-experience-builder-questions/add-graphics-to-graphics-layer-after-view-has/m-p/1691272#M22847</link>
    <description>&lt;P&gt;I'm not surprised your getting an infinite loop. I'm pretty sure adding graphics to a layer should cause the LayerView to update. What are you trying to accomplish with this code? Maybe you need to add the Graphics to a different layer? Or perhaps, you should be watching the view.stationary property instead?&lt;/P&gt;</description>
    <pubDate>Wed, 18 Mar 2026 15:20:45 GMT</pubDate>
    <dc:creator>JeffreyThompson2</dc:creator>
    <dc:date>2026-03-18T15:20:45Z</dc:date>
    <item>
      <title>Add graphics to graphics layer after view has finished updating</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/add-graphics-to-graphics-layer-after-view-has/m-p/1691266#M22846</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am building an ExB custom widget that listens for the view updating event. I have set up the listener using reactiveUtils as below;&lt;/P&gt;&lt;P&gt;const viewUpdating = reactiveUtils.when(() =&amp;gt; !jmvRefAMISTracking.current.view.updating,() =&amp;gt;{&lt;/P&gt;&lt;P&gt;console.log('view has finished updating, get assets in current map view.')&lt;BR /&gt;&lt;BR /&gt;getAssetsInCurrentView()&lt;BR /&gt;//onShowErrorRings()&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;})&lt;/P&gt;&lt;P&gt;The function&amp;nbsp;getAssetsInCurrentView() updates the state of grid that is displayed on the widget. In addition to updating the grid I would like to also add a few features to a graphics layer. Typically the number of fews added will be &amp;lt;5 with very simple geometry.&lt;/P&gt;&lt;P&gt;The code I have to add the graphics is shown below&lt;/P&gt;&lt;P&gt;locationErrorBuffers.current.graphics.add(new Graphic ({&lt;BR /&gt;geometry: error_circle,&lt;BR /&gt;symbol: sfs&lt;BR /&gt;}))&lt;/P&gt;&lt;P&gt;The line above is causing an infinite loop for some reason and my browser becomes unresponsive.&lt;/P&gt;&lt;P&gt;Is the a limitations on the code that I can execute after my view has finished updating? If I comment out the line that adds graphics everything works fine as I expect. Any pointers will be much appreciated.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2026 15:05:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/add-graphics-to-graphics-layer-after-view-has/m-p/1691266#M22846</guid>
      <dc:creator>wadsonmakari</dc:creator>
      <dc:date>2026-03-18T15:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Add graphics to graphics layer after view has finished updating</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/add-graphics-to-graphics-layer-after-view-has/m-p/1691272#M22847</link>
      <description>&lt;P&gt;I'm not surprised your getting an infinite loop. I'm pretty sure adding graphics to a layer should cause the LayerView to update. What are you trying to accomplish with this code? Maybe you need to add the Graphics to a different layer? Or perhaps, you should be watching the view.stationary property instead?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2026 15:20:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/add-graphics-to-graphics-layer-after-view-has/m-p/1691272#M22847</guid>
      <dc:creator>JeffreyThompson2</dc:creator>
      <dc:date>2026-03-18T15:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: Add graphics to graphics layer after view has finished updating</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/add-graphics-to-graphics-layer-after-view-has/m-p/1691280#M22848</link>
      <description>&lt;P&gt;I have a point feature service that is updated every minute and each feature has positional error value that is updated every minute as well. The end user can select a subset of the features to display the error rings if they wish, so was thinking I could listen for when the view has finished updating get the latest positional error values and draw the error rings in graphics layer. Ideally i would like the error rings to follow the points as they move about.&lt;/P&gt;&lt;P&gt;Your explanation makes sense but listening for the view stationary would not achieve my objective as my graphics would only update after I manually move the map and the view is stationary.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2026 15:54:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/add-graphics-to-graphics-layer-after-view-has/m-p/1691280#M22848</guid>
      <dc:creator>wadsonmakari</dc:creator>
      <dc:date>2026-03-18T15:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Add graphics to graphics layer after view has finished updating</title>
      <link>https://community.esri.com/t5/arcgis-experience-builder-questions/add-graphics-to-graphics-layer-after-view-has/m-p/1691282#M22849</link>
      <description>&lt;P&gt;Which view are you watching? The MapView or the FeatureLayerView? I think you should be able to get what you want by watching the FeatureLayerView and saving your graphics to a separate GraphicsLayer.&lt;/P&gt;&lt;P&gt;You might also want to try setInterval() to do something on every X milliseconds.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2026 16:02:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-experience-builder-questions/add-graphics-to-graphics-layer-after-view-has/m-p/1691282#M22849</guid>
      <dc:creator>JeffreyThompson2</dc:creator>
      <dc:date>2026-03-18T16:02:42Z</dc:date>
    </item>
  </channel>
</rss>

