<?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: Uploading a shapefile using ArcGIS JavaScript API 4.9 esri/request method? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/uploading-a-shapefile-using-arcgis-javascript-api/m-p/356724#M33032</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Munachiso,&lt;/P&gt;&lt;P&gt;Thank you kindly for your feedback.&amp;nbsp; We are working with polygons so that is good to know.&amp;nbsp; Also, we did notice the query parameter issue.&amp;nbsp; We have AGOL and Portal access.&amp;nbsp; I will take a look at your sample and also the Fetch API and see if this will get working.&amp;nbsp; Thanks again for your feedback.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 13 Dec 2018 21:08:14 GMT</pubDate>
    <dc:creator>CenterlineMapping</dc:creator>
    <dc:date>2018-12-13T21:08:14Z</dc:date>
    <item>
      <title>Uploading a shapefile using ArcGIS JavaScript API 4.9 esri/request method?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/uploading-a-shapefile-using-arcgis-javascript-api/m-p/356722#M33030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anyone have sample code for uploading a shapefile client side using the 4.9 javascript api and the esri/request method?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Dec 2018 17:31:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/uploading-a-shapefile-using-arcgis-javascript-api/m-p/356722#M33030</guid>
      <dc:creator>CenterlineMapping</dc:creator>
      <dc:date>2018-12-11T17:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: Uploading a shapefile using ArcGIS JavaScript API 4.9 esri/request method?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/uploading-a-shapefile-using-arcgis-javascript-api/m-p/356723#M33031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Centerline,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was actually working on a sample that takes the 3.x sample of adding shapefiles to the map (&lt;A href="https://developers.arcgis.com/javascript/3/sandbox/sandbox.html?sample=portal_addshapefile&amp;amp;share=false"&gt;Add Shapefile&lt;/A&gt;) and converting it to 4.x.&amp;nbsp; It currently only works when the shapefile has points and not polygons/polylines. I ran into some issues when trying to complete this though...&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;There is currently a bug with esri/request where the query parameters does not get passed to the body when making a POST. To work around this you can use a different request API like &lt;A href="https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API"&gt;Fetch&lt;/A&gt;.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Like I have said above, I have a working beta for shapefiles that include points. If you would like to use that as a starting point, feel free to let me know and I can send it to you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, you mentioned client-side, the sample would need an Portal or ArcGIS Online for this to work since it uses the&amp;nbsp;&lt;A href="https://developers.arcgis.com/rest/users-groups-and-items/generate.htm"&gt;Generate operation&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: Looks like I actually got it to work. Here is the link to the code &lt;A href="https://gist.github.com/nommuna2/93bc71e90e44b8aad72291f41207fcd9"&gt;Sample of add shapefile&lt;/A&gt;. You do need AGOL or Portal for this to work. Also you may need the resource proxy to remedy any CORS errors you may get. This sample is based on the 3.x, so a lot of the code from that sample is the same with some changes for 4.x.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Dec 2018 20:27:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/uploading-a-shapefile-using-arcgis-javascript-api/m-p/356723#M33031</guid>
      <dc:creator>MunachisoOgbuchiekwe</dc:creator>
      <dc:date>2018-12-12T20:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: Uploading a shapefile using ArcGIS JavaScript API 4.9 esri/request method?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/uploading-a-shapefile-using-arcgis-javascript-api/m-p/356724#M33032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Munachiso,&lt;/P&gt;&lt;P&gt;Thank you kindly for your feedback.&amp;nbsp; We are working with polygons so that is good to know.&amp;nbsp; Also, we did notice the query parameter issue.&amp;nbsp; We have AGOL and Portal access.&amp;nbsp; I will take a look at your sample and also the Fetch API and see if this will get working.&amp;nbsp; Thanks again for your feedback.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2018 21:08:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/uploading-a-shapefile-using-arcgis-javascript-api/m-p/356724#M33032</guid>
      <dc:creator>CenterlineMapping</dc:creator>
      <dc:date>2018-12-13T21:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: Uploading a shapefile using ArcGIS JavaScript API 4.9 esri/request method?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/uploading-a-shapefile-using-arcgis-javascript-api/m-p/356725#M33033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;UPDATE:&amp;nbsp; Munachiso, were you able to get it to work for polygons?&amp;nbsp; Thanks again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2018 21:16:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/uploading-a-shapefile-using-arcgis-javascript-api/m-p/356725#M33033</guid>
      <dc:creator>CenterlineMapping</dc:creator>
      <dc:date>2018-12-13T21:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Uploading a shapefile using ArcGIS JavaScript API 4.9 esri/request method?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/uploading-a-shapefile-using-arcgis-javascript-api/m-p/356726#M33034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I have updated the sample and it should work with polygons and polylines.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2018 22:50:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/uploading-a-shapefile-using-arcgis-javascript-api/m-p/356726#M33034</guid>
      <dc:creator>MunachisoOgbuchiekwe</dc:creator>
      <dc:date>2018-12-13T22:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Uploading a shapefile using ArcGIS JavaScript API 4.9 esri/request method?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/uploading-a-shapefile-using-arcgis-javascript-api/m-p/356727#M33035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Munachiso, I appreciate your&amp;nbsp;expertise.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 Dec 2018 14:27:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/uploading-a-shapefile-using-arcgis-javascript-api/m-p/356727#M33035</guid>
      <dc:creator>CenterlineMapping</dc:creator>
      <dc:date>2018-12-17T14:27:35Z</dc:date>
    </item>
  </channel>
</rss>

