csv layer

886
2
Jump to solution
04-10-2017 11:30 AM
HoussamSmail
New Contributor

hi

I want to to display attributes from a csv layer in a Feature Table for javascript

like this 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
YueWu1
by Esri Regular Contributor
Esri Regular Contributor

Hi Houssam Smail,

You need to manually add those csv fieldInfo based on your schema and loaded as fieldInfos inside of FeatureTable Widget. And you probably need to setup proxy to make sure the requests pass the CORS, or put your csv file and application in the same web domain. 

Here is a proof of concept that you can basically merge these two samples together to make the csvlayer sample with featureTable sample:

JS Bin - Collaborative JavaScript Debugging 

Hope this can provide you some inspiration to do.

Best Regards,

Nathan

View solution in original post

2 Replies
YueWu1
by Esri Regular Contributor
Esri Regular Contributor

Hi Houssam Smail,

You need to manually add those csv fieldInfo based on your schema and loaded as fieldInfos inside of FeatureTable Widget. And you probably need to setup proxy to make sure the requests pass the CORS, or put your csv file and application in the same web domain. 

Here is a proof of concept that you can basically merge these two samples together to make the csvlayer sample with featureTable sample:

JS Bin - Collaborative JavaScript Debugging 

Hope this can provide you some inspiration to do.

Best Regards,

Nathan

HoussamSmail
New Contributor

thank you 1 million times 

0 Kudos