I am trying to create an app that allows a user to upload a csv file and uses the Analyze and Generate tool from the REST API to get a feature collection which can be displayed on the map.
- Analyze: https://developers.arcgis.com/rest/users-groups-and-items/generate.htm
- Generate: https://developers.arcgis.com/rest/users-groups-and-items/generate.htm
This sample code already shows how it is done for shapefiles, but I need to be able to do it for CSVs too: https://developers.arcgis.com/javascript/latest/sample-code/layers-featurelayer-shapefile/. The Generate documentation says it works for CSVs but when I analyze the CSV first and append the publish parameters to the query (to be used in the generate tool), I get a 414 error saying the URI is too long.
I understand I might not need to use all of the publish parameters from the analysis, but the documentation doesn't really say what all should be passed through and not so I just assumed pass the whole thing. If someone could further clarify what needs to be passed in or a solution to the URI being too long that would be appreciated.
The results from the analyze function are attached.