Add data widget

420
1
08-28-2019 08:02 AM
JohnBrushett
New Contributor III

I'd like to create a bespoke application using the API where I can add an excel or csv file with lots of XY coordinates, utilise the coordinate converter and output to another excel file.

This is for a customer that has no access to ArcGIS or Online/Portal and won't be able to host data so needs access local files in Windows Explorer. They also wish to load the same app on a mobile device.

My thinking was to use the Add Data widget, like the one available in WAB Dev Edition, but there isn't one in the API. Has anyone tried this themselves?

0 Kudos
1 Reply
BenElan
Esri Contributor

You could use a CSVLayer to load in the points: CSVLayer | ArcGIS API for JavaScript 4.12 

Here's a sample using CSVLayer: CSVLayer | ArcGIS API for JavaScript 4.12 

I wrote some code to export points to csv, you could use it as a sample: https://codepen.io/benesri/pen/ZEzyQNm