<?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: Updating geometry (position) of graphics in 4.4 doesn't visually update the layer. in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-geometry-position-of-graphics-in-4-4/m-p/570522#M53190</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matthew,&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp; According to the 4.x functionality matrix:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;A href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fdevelopers.arcgis.com%2Fjavascript%2Flatest%2Fguide%2Ffunctionality-matrix%2Findex.html%23graphicslayer" rel="nofollow" style="color: #287433; border: 0px; font-weight: inherit; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;Functionality matrix | ArcGIS API for JavaScript 4.4&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="" style="background-color: #ffffff; border: 0px;"&gt;&lt;TABLE style="color: #4c4c4c; background-color: #ffffff; border: 1px solid #cccccc; font-weight: inherit; font-size: 0.875rem; margin: 0px 0px 1.55rem;"&gt;&lt;TBODY style="border: inherit solid inherit; font-weight: inherit; font-size: 14px;"&gt;&lt;TR style="background-color: #f8f8f8; border-bottom: 1px solid #cccccc; border-top-width: inherit; border-left-width: inherit; border-right-width: inherit; border-top-style: solid; border-left-style: solid; border-right-style: solid; border-top-color: inherit; border-left-color: inherit; font-weight: inherit; font-size: 14px;"&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top-width: inherit; border-bottom-width: inherit; border-top-style: solid; border-bottom-style: solid; border-top-color: inherit; border-bottom-color: inherit; font-weight: 300; font-size: 14px; padding: 0.51667rem;"&gt;Modify graphics&lt;/TD&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top-width: inherit; border-bottom-width: inherit; border-top-style: solid; border-bottom-style: solid; border-top-color: inherit; border-bottom-color: inherit; font-weight: 300; font-size: 14px; padding: 0.51667rem;"&gt;Coming soon&lt;/TD&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top-width: inherit; border-bottom-width: inherit; border-top-style: solid; border-bottom-style: solid; border-top-color: inherit; border-bottom-color: inherit; font-weight: 300; font-size: 14px; padding: 0.51667rem;"&gt;To modify a graphic that is already added to the layer: you need to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fdevelopers.arcgis.com%2Fjavascript%2Flatest%2Fapi-reference%2Fesri-Graphic.html%23clone" rel="nofollow" style="color: #0079c1; border: 0px; font-weight: inherit; text-decoration: none; font-size: 14px; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;clone&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;it, make modifications, add it to the layer and remove the original graphic. In-place modification of graphic objects will not trigger display refresh.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;See this thread for a clone example:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.esri.com/thread/177053#comment-679223" title="https://community.esri.com/thread/177053#comment-679223"&gt;https://community.esri.com/thread/177053#comment-679223&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Aug 2017 12:45:06 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2017-08-11T12:45:06Z</dc:date>
    <item>
      <title>Updating geometry (position) of graphics in 4.4 doesn't visually update the layer.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-geometry-position-of-graphics-in-4-4/m-p/570521#M53189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have found that when I try updating the location of a given graphic that has already been placed on a layer in 4.4 (graphic.geometry), the changes do not visually update on the layer and the marker remains at the position it was when instantiated (or at the location from the very first call to update geometry). I did not experience this in 3.2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For instance, if you create a Point graphic with marker symbol, and add it to the layer at particular coordinates and then create a timer to programmatically update its location every 5 seconds using a bank of coordinates, it will only update visually on the screen the first time that method is called. By contrast, if you change the marker color etc. each frame it is updated to reflect accordingly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you delete the graphic and remove it from the layer, then define a new one with the updated geometry position, it updates successfully. But I feel this shouldn't be necessary. Does anyone have any thoughts on why we cannot reassign graphic.geometry to new values more than once in 4.4? Does any sample exist to illustrate how to dynamically update the position of a graphic without deleting it each call, and without resorting to using the track widget?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2017 05:29:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-geometry-position-of-graphics-in-4-4/m-p/570521#M53189</guid>
      <dc:creator>MatthewPilz</dc:creator>
      <dc:date>2017-08-11T05:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: Updating geometry (position) of graphics in 4.4 doesn't visually update the layer.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-geometry-position-of-graphics-in-4-4/m-p/570522#M53190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matthew,&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp; According to the 4.x functionality matrix:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;A href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fdevelopers.arcgis.com%2Fjavascript%2Flatest%2Fguide%2Ffunctionality-matrix%2Findex.html%23graphicslayer" rel="nofollow" style="color: #287433; border: 0px; font-weight: inherit; text-decoration: none; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;Functionality matrix | ArcGIS API for JavaScript 4.4&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="" style="background-color: #ffffff; border: 0px;"&gt;&lt;TABLE style="color: #4c4c4c; background-color: #ffffff; border: 1px solid #cccccc; font-weight: inherit; font-size: 0.875rem; margin: 0px 0px 1.55rem;"&gt;&lt;TBODY style="border: inherit solid inherit; font-weight: inherit; font-size: 14px;"&gt;&lt;TR style="background-color: #f8f8f8; border-bottom: 1px solid #cccccc; border-top-width: inherit; border-left-width: inherit; border-right-width: inherit; border-top-style: solid; border-left-style: solid; border-right-style: solid; border-top-color: inherit; border-left-color: inherit; font-weight: inherit; font-size: 14px;"&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top-width: inherit; border-bottom-width: inherit; border-top-style: solid; border-bottom-style: solid; border-top-color: inherit; border-bottom-color: inherit; font-weight: 300; font-size: 14px; padding: 0.51667rem;"&gt;Modify graphics&lt;/TD&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top-width: inherit; border-bottom-width: inherit; border-top-style: solid; border-bottom-style: solid; border-top-color: inherit; border-bottom-color: inherit; font-weight: 300; font-size: 14px; padding: 0.51667rem;"&gt;Coming soon&lt;/TD&gt;&lt;TD style="border-left: 1px solid #cccccc; border-right: 1px solid #cccccc; border-top-width: inherit; border-bottom-width: inherit; border-top-style: solid; border-bottom-style: solid; border-top-color: inherit; border-bottom-color: inherit; font-weight: 300; font-size: 14px; padding: 0.51667rem;"&gt;To modify a graphic that is already added to the layer: you need to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fdevelopers.arcgis.com%2Fjavascript%2Flatest%2Fapi-reference%2Fesri-Graphic.html%23clone" rel="nofollow" style="color: #0079c1; border: 0px; font-weight: inherit; text-decoration: none; font-size: 14px; padding: 0px calc(12px + 0.35ex) 0px 0px;" target="_blank"&gt;clone&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;it, make modifications, add it to the layer and remove the original graphic. In-place modification of graphic objects will not trigger display refresh.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;P&gt;See this thread for a clone example:&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="link-titled" href="https://community.esri.com/thread/177053#comment-679223" title="https://community.esri.com/thread/177053#comment-679223"&gt;https://community.esri.com/thread/177053#comment-679223&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2017 12:45:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-geometry-position-of-graphics-in-4-4/m-p/570522#M53190</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-08-11T12:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: Updating geometry (position) of graphics in 4.4 doesn't visually update the layer.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-geometry-position-of-graphics-in-4-4/m-p/570523#M53191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Robert's answer covers this well, but I would&amp;nbsp;add that the thing to do might be to write your own move function:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;move&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; geometry&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; newGraphic &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; graphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;clone&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; newGraphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;geometry &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; geometry&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; graphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;remove&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&amp;nbsp; graphic&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;newGraphic&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This may cut down on boilerplate if moving a graphic is something you're doing a lot.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That example&amp;nbsp;work for a graphics layer. &amp;nbsp;For other kinds of layers, it may be more complicated and you should handle each layer type and the view's graphics layer (view.graphics) differently.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:33:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-geometry-position-of-graphics-in-4-4/m-p/570523#M53191</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2021-12-12T00:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Updating geometry (position) of graphics in 4.4 doesn't visually update the layer.</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-geometry-position-of-graphics-in-4-4/m-p/570524#M53192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you both for the added clarification and example. I was achieving this similarly but missed the detail in the documentation that modifying graphics isn't yet natively supported in 4.x, which had me baffled for awhile. I appreciate your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2017 20:56:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/updating-geometry-position-of-graphics-in-4-4/m-p/570524#M53192</guid>
      <dc:creator>MatthewPilz</dc:creator>
      <dc:date>2017-08-11T20:56:39Z</dc:date>
    </item>
  </channel>
</rss>

