AnsweredAssumed Answered

Add Shapefile in JS 4.2

Question asked by bpayne10 on Feb 14, 2017
Latest reply on May 9, 2019 by jay.kapalczynski

I'm wondering if anyone has been able to add a shapefile to a JS 4.2 app yet?  I see the documentation for doing it in 3.19 (Add shapefile | ArcGIS API for JavaScript 3.19 ) and I've gotten this to work as a local demo project, but there are a few changes from 3.x to 4.x that seem to make this quite hard to do.  Specifically, the esri/request has changed to no longer use a "form" parameter, so how do we upload the zipped shapefile now?  


Ideally, I'd like to be able to add an in-memory instance of a shapefile from a database download as well as a user selected shapefile from their local machine.  Anyone have some ideas on this? I'm starting to lean toward a third-party tool to parse out the geojson data from the shapefile and manually add in a new feature layer, but this seems like more work than should be necessary.