<?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: Feature edit and existing graphics in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-edit-and-existing-graphics/m-p/46658#M4070</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The applyEdits parameter is expecting an array of features, meaning your graphic has to be enclosed in brackets. Have you tried&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALFLayer.applyEdits(&lt;SPAN style="color: #e23d39;"&gt;[&lt;/SPAN&gt;evt.graphic&lt;SPAN style="color: #e23d39;"&gt;]&lt;/SPAN&gt;,null,null,null,errCallback);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 Feb 2015 13:50:08 GMT</pubDate>
    <dc:creator>KenBuja</dc:creator>
    <dc:date>2015-02-11T13:50:08Z</dc:date>
    <item>
      <title>Feature edit and existing graphics</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-edit-and-existing-graphics/m-p/46655#M4067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if this is possible on the API, but im wondering if there is a way to add an existing graphic to a feature layer.&lt;/P&gt;&lt;P&gt; &lt;A href="https://developers.arcgis.com/javascript/jssamples/ed_simpletoolbar.html" title="https://developers.arcgis.com/javascript/jssamples/ed_simpletoolbar.html"&gt;Editor widget with simple toolbar | ArcGIS API for JavaScript&lt;/A&gt;&amp;nbsp; this sample allows you to draw a graphic (polygon) and it would add it to a feature layer. What Im trying to do is have a user look up an address &lt;EM&gt;(&lt;A href="http://developers.arcgis.com/javascript/samples/find_popup/" title="http://developers.arcgis.com/javascript/samples/find_popup/"&gt;Identify with Popup&lt;/A&gt; - as seen here, the user can click an address and it would highlight that polygon)&lt;/EM&gt; and that address polygon would go into a feature layer upon click.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2015 14:11:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-edit-and-existing-graphics/m-p/46655#M4067</guid>
      <dc:creator>IbrahimHussein</dc:creator>
      <dc:date>2015-02-10T14:11:12Z</dc:date>
    </item>
    <item>
      <title>Re: Feature edit and existing graphics</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-edit-and-existing-graphics/m-p/46656#M4068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can use the FeatureLayer's &lt;A href="https://developers.arcgis.com/javascript/jsapi/featurelayer-amd.html#applyedits"&gt;applyEdits&lt;/A&gt; method to save a graphic. Once you have the graphic's geometry and attributes, use the first optional parameter to save it to the featurelayer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14235804735367213 jive_text_macro" jivemacro_uid="_14235804735367213" modifiedtitle="true"&gt;&lt;P&gt;myFeatureLayer.applyEdits([myGraphic],null,null);&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Feb 2015 15:01:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-edit-and-existing-graphics/m-p/46656#M4068</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2015-02-10T15:01:49Z</dc:date>
    </item>
    <item>
      <title>Re: Feature edit and existing graphics</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-edit-and-existing-graphics/m-p/46657#M4069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your help; I tried the method you mentioned and I cant seem to get it to work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="applyedits.jpg" class="jive-image image-1" src="https://community.esri.com/legacyfs/online/60706_applyedits.jpg" style="width: 620px; height: 290px;" /&gt;&lt;/P&gt;&lt;P&gt;map.graphics.on("click", function(evt) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("before edit");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ALFLayer.applyEdits(evt.graphic,null,null,null,errCallback);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log("after edit");&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; console.log(evt.graphic);&lt;/P&gt;&lt;P&gt;&amp;nbsp; });&lt;/P&gt;&lt;P&gt;I put some console.logs to see whats happening. the console.log(evt.graphic) shows a geometry and attribute. But when I do apply edits, nothing seems to happen in the data table. Im wondering if its because a field that cant be null is becoming null? one thing I noticed is when the applyedits code runs, that progress bar below the edit bar never goes away, so it must be stuck on something; even though nothing shows in the console. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Feb 2015 13:38:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-edit-and-existing-graphics/m-p/46657#M4069</guid>
      <dc:creator>IbrahimHussein</dc:creator>
      <dc:date>2015-02-11T13:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Feature edit and existing graphics</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-edit-and-existing-graphics/m-p/46658#M4070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The applyEdits parameter is expecting an array of features, meaning your graphic has to be enclosed in brackets. Have you tried&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALFLayer.applyEdits(&lt;SPAN style="color: #e23d39;"&gt;[&lt;/SPAN&gt;evt.graphic&lt;SPAN style="color: #e23d39;"&gt;]&lt;/SPAN&gt;,null,null,null,errCallback);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Feb 2015 13:50:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-edit-and-existing-graphics/m-p/46658#M4070</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2015-02-11T13:50:08Z</dc:date>
    </item>
    <item>
      <title>Re: Feature edit and existing graphics</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-edit-and-existing-graphics/m-p/46659#M4071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yup that was it. thanks. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Feb 2015 13:58:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/feature-edit-and-existing-graphics/m-p/46659#M4071</guid>
      <dc:creator>IbrahimHussein</dc:creator>
      <dc:date>2015-02-11T13:58:39Z</dc:date>
    </item>
  </channel>
</rss>

