<?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: How to add feature to service layer? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-feature-to-service-layer/m-p/410276#M37772</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Edgar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Can you elaborate as to why you are attempting to add the feature using AJAX instead of the FeatureLayer.applyEdits([new features]) method?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Oct 2017 17:24:53 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2017-10-27T17:24:53Z</dc:date>
    <item>
      <title>How to add feature to service layer?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-feature-to-service-layer/m-p/410275#M37771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to add a feature to a service layer using ajax post. I get a 200 back but when i query the service, the post feature does not show. I am using ArcGis Online 1.5.1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;service:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://services2.arcgis.com/qvkbeam7Wirps6zC/ArcGIS/rest/services/service_e85611f4185545fab4a50ca81ca14ebf/FeatureServer/0/" title="https://services2.arcgis.com/qvkbeam7Wirps6zC/ArcGIS/rest/services/service_e85611f4185545fab4a50ca81ca14ebf/FeatureServer/0/"&gt;https://services2.arcgis.com/qvkbeam7Wirps6zC/ArcGIS/rest/services/service_e85611f4185545fab4a50ca81ca14ebf/FeatureServe…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2017 17:17:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-feature-to-service-layer/m-p/410275#M37771</guid>
      <dc:creator>EdgarMontes</dc:creator>
      <dc:date>2017-10-27T17:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to add feature to service layer?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-feature-to-service-layer/m-p/410276#M37772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Edgar,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Can you elaborate as to why you are attempting to add the feature using AJAX instead of the FeatureLayer.applyEdits([new features]) method?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2017 17:24:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-feature-to-service-layer/m-p/410276#M37772</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-10-27T17:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to add feature to service layer?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-feature-to-service-layer/m-p/410277#M37773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have light a custom application with a form that post to our service. Do I need arcgis.js to do any edits to services?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2017 17:34:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-feature-to-service-layer/m-p/410277#M37773</guid>
      <dc:creator>EdgarMontes</dc:creator>
      <dc:date>2017-10-27T17:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to add feature to service layer?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-feature-to-service-layer/m-p/410278#M37774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No it should not be necessary. can you post the code you are using for the AJAX Post?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2017 18:40:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-feature-to-service-layer/m-p/410278#M37774</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2017-10-27T18:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to add feature to service layer?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-feature-to-service-layer/m-p/410279#M37775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I finally fixed it, for some reason it wanted me to post my data as a string in the url, instead of withing my request body. Here is the code for anyone that wants to try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;const url = '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.esri.com/external-link.jspa?url=https%3A%2F%2Fservices2.arcgis.com%2Fqvkbeam7Wirps6zC%2FArcGIS%2Frest%2Fservices%2Fservice_e85611f4185545fab4a50ca81ca14ebf%2FFeatureServer%2F0%2FaddFeatures%3Ffeatures%3D%27%2B" rel="nofollow" target="_blank"&gt;https://services2.arcgis.com/qvkbeam7Wirps6zC/ArcGIS/rest/services/service_e85611f4185545fab4a50ca81ca14ebf/FeatureServer/0/addFeatures?features='+&lt;/A&gt;&lt;SPAN&gt; encodeURIComponent(JSON.stringify(data)) +'&amp;amp;f=json';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; var request = new Request(url, {&lt;BR /&gt; method: 'POST',&lt;BR /&gt; body: '',&lt;BR /&gt; headers: new Headers()&lt;BR /&gt; });&lt;/P&gt;&lt;P&gt;fetch(request)&lt;BR /&gt; .then((resp) =&amp;gt; {&lt;BR /&gt; console.log(resp);&lt;BR /&gt; console.log(resp.status);&lt;BR /&gt; if(resp.status === 200){&lt;BR /&gt; console.log('item submitted');&lt;BR /&gt; }&lt;BR /&gt; });&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Oct 2017 19:12:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-add-feature-to-service-layer/m-p/410279#M37775</guid>
      <dc:creator>EdgarMontes</dc:creator>
      <dc:date>2017-10-27T19:12:59Z</dc:date>
    </item>
  </channel>
</rss>

