<?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: JS API 4.5 new Graphic geometry set to null in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-4-5-new-graphic-geometry-set-to-null/m-p/740054#M68499</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kyle,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;??? Why would not not get the actual graphic and just update the properties and then applyEdits that way the geometry is not null?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Nov 2017 01:04:01 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2017-11-10T01:04:01Z</dc:date>
    <item>
      <title>JS API 4.5 new Graphic geometry set to null</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-4-5-new-graphic-geometry-set-to-null/m-p/740053#M68498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;var tmpGraphic = new Graphic({&lt;BR /&gt;&amp;nbsp; attributes: {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; "objectid":&amp;nbsp;someObjectID&lt;BR /&gt;&amp;nbsp; &amp;nbsp; "someAttribute" : someAtrribute&lt;BR /&gt;&amp;nbsp; }&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;featureLayer.applyEdits({&lt;BR /&gt;&amp;nbsp; updateFeatures: [tmpGraphic]&lt;BR /&gt; }).then....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The applyEdits request shows the geometry for the graphic as null, thus overwriting the geometry on the feature layer.&lt;/P&gt;&lt;P&gt;I assume this is new as it hasn't been happening before...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2017 00:38:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-4-5-new-graphic-geometry-set-to-null/m-p/740053#M68498</guid>
      <dc:creator>KyleDunaway1</dc:creator>
      <dc:date>2017-11-10T00:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: JS API 4.5 new Graphic geometry set to null</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-4-5-new-graphic-geometry-set-to-null/m-p/740054#M68499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kyle,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;??? Why would not not get the actual graphic and just update the properties and then applyEdits that way the geometry is not null?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2017 01:04:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-4-5-new-graphic-geometry-set-to-null/m-p/740054#M68499</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-11-10T01:04:01Z</dc:date>
    </item>
    <item>
      <title>Re: JS API 4.5 new Graphic geometry set to null</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-4-5-new-graphic-geometry-set-to-null/m-p/740055#M68500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of passing in a Graphic to apply Edits, try just passing in an object&amp;nbsp;like:&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;let&lt;/SPAN&gt; graphicObj &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; attributes&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; objectId&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; attr1&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;5&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; attr2&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"hi"&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

featureLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;applyEdits&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
&amp;nbsp; updateFeatures&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;graphicObj&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="token function"&gt;then&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;&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could also try getting the object by doing let json = graphic.toJSON() and then delete json.geometry.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:30:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-4-5-new-graphic-geometry-set-to-null/m-p/740055#M68500</guid>
      <dc:creator>ThomasSolow</dc:creator>
      <dc:date>2021-12-12T07:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: JS API 4.5 new Graphic geometry set to null</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-4-5-new-graphic-geometry-set-to-null/m-p/740056#M68501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, passing just an object worked.&amp;nbsp; I assumed it had to be a Graphic object.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2017 19:09:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-4-5-new-graphic-geometry-set-to-null/m-p/740056#M68501</guid>
      <dc:creator>KyleDunaway1</dc:creator>
      <dc:date>2017-11-10T19:09:25Z</dc:date>
    </item>
    <item>
      <title>Re: JS API 4.5 new Graphic geometry set to null</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-4-5-new-graphic-geometry-set-to-null/m-p/740057#M68502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because I have 1000+ features in a table and am using a select to change an attribute.&amp;nbsp; No geometry, so getting the actually geometry would require returning it in the query and that would be wasteful performance wise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Nov 2017 19:10:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/js-api-4-5-new-graphic-geometry-set-to-null/m-p/740057#M68502</guid>
      <dc:creator>KyleDunaway1</dc:creator>
      <dc:date>2017-11-10T19:10:28Z</dc:date>
    </item>
  </channel>
</rss>

