Select to view content in your preferred language

Fill class FeatureServiceTable with JSON Data?

449
2
Jump to solution
05-22-2020 02:54 AM
KengueDonald
New Contributor

Hi!

Please i'm new to Arcgis and i'm trying to use the following method:

mServiceFeatureTable = new ServiceFeatureTable(data);

I remark that this class use in parameter an URL, but me i just have data in a JSON file. So i would like to know how can i use it with a JSON file, otherwise if it is impossible is it a way to transform my data into urls for using it? if yes could you give me a sample demonstration or the steps to follow?

Thanks

0 Kudos
1 Solution

Accepted Solutions
Nicholas-Furness
Esri Regular Contributor

Hi.

You could do one of 2 things:

1. If it's GeoJSON you could upload it to create a new feature service in ArcGIS Online. See this document. This will give you a feature service with a single layer in it. That layer will have a URL that you can use with a ServiceFeatureTable (as above).

2. You could parse the JSON to create a FeatureCollection. See this tutorial.

In short, you can definitely parse it or import it, depending on the data format.

Hope that helps.

View solution in original post

2 Replies
Nicholas-Furness
Esri Regular Contributor

Hi.

You could do one of 2 things:

1. If it's GeoJSON you could upload it to create a new feature service in ArcGIS Online. See this document. This will give you a feature service with a single layer in it. That layer will have a URL that you can use with a ServiceFeatureTable (as above).

2. You could parse the JSON to create a FeatureCollection. See this tutorial.

In short, you can definitely parse it or import it, depending on the data format.

Hope that helps.

KengueDonald
New Contributor

Thank you very much, it was very helpful. Now I'm done.

Thank

0 Kudos