Hello, I am currently attempting to parse an array of assets and their locations and insert it into an ESRI feature layer that I can add to my map.
This is what the objects in the array look like:
I was wondering if it would be possible to convert the array into a Feature collection, or if it needs to be a JSON object? If it is possible what steps could I take?
This is my current map, where assets is the array I want to convert into a feature collection:
Solved! Go to Solution.
I do not see any geometry information (for example, latitude/longitude) in your screenshot - do you have that info for each asset? If not, that would be the first step. Then you can add them using Leaflet (for example, L.Marker). If you want to transform it into a GeoJSON FeatureCollection, you can use L.geoJSON - that would work too.
I do not see any geometry information (for example, latitude/longitude) in your screenshot - do you have that info for each asset? If not, that would be the first step. Then you can add them using Leaflet (for example, L.Marker). If you want to transform it into a GeoJSON FeatureCollection, you can use L.geoJSON - that would work too.