[GIS] Feature Layer from JSON file

arcgis-javascript-apifeature-datasetfeature-layerjavascript

I would like to project my shapefile information on the maps. I converted my shapefile into a JSON file. How can use the Json file to create a featurecollection object in the ARCGIS Javascript API. The Json file contains 50 thousand features. Have given a sample set of my feature collection below. I do not want to embed the entire JSON file within the javascript file.

{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "ROADNAME": "AAA", "LINK_INDEX": 1}, "geometry": { "type": "LineString", "coordinates": [ [ 163.554342, -77.702882 ], [
163.553160, -77.702327 ] ] } } , { "type": "Feature", "properties": { "ROADNAME": "KIAN TECK WAY","LINK_INDEX": 2}, "geometry": { "type": "LineString", "coordinates": [ [ 162.527145, -77.686591 ], [
162.522273, -77.686598 ] ] } } }

Best Answer

Here are some example to show the Json based FeatureCollection as Feature Layer in ARCGIS Javascript API Json Featurelayer 1 and Json To FeatureLayer 2. For showing the 50 Thousand write Handler which returns Json Something like this --->> Json Handler and give that output of the handler as a string to feature collection.Hope this helps you.

Related Question