How can I publish a REST service that provides JSON reponse with lat/lon coordinates as a FeatureLayer in my Portal?

173
0
10-10-2019 06:42 PM
HectorCervantes1
New Contributor

The endpoint returns results in JSON format (not GeoJSON) such as:

[
{
"_id": "5d9fdca7e8b52460c0bfc640",
"index": 0,
"guid": "7a206777-f7cf-4adb-b988-a7667c7c203b",
"isActive": true,
"image": "http://placehold.it/32x32",
"eventType": "radius",
"latitude": "22.992393",
"longitude": "35.205014"
},
{
"_id": "5d9fdca79f1705851a3b341a",
"index": 1,
"guid": "3bd4838f-f916-4b5b-8802-31cc4953843e",
"isActive": false,
"image": "http://placehold.it/32x32",
"eventType": "green",
"latitude": "-37.452677",
"longitude": "117.748401"
}

]

I would like to be able to publish this REST Endpoint as a FeatuerLayer in Portal so users can add it to map.  I suspect I will need to do some custom scripting to convert this into GeoJSON or something like that.  

Any help is appreciated!

0 Kudos
0 Replies