I have an application built in Angular which will invoke a RESTful service in back-end application which in turn will call the ArcGIS REST API.
For: a feature will be created in the Angular application which will call addFeature (RESTful Service) in the back, which in turn will call the ArcGIS REST API which is for now:
The back-end service would receive the data in GeoJSON format and the REST API is not accepting it. I guess it's expecting an ArcGIS format which looks like this:
[
{
"geometry" : {"x" : -118.15, "y" : 33.80},
"attributes" : {
"OWNER" : "Joe Smith",
"VALUE" : 94820.37,
"APPROVED" : true,
"LASTUPDATE" : 1227663551096
}
},
{
"geometry" : { "x" : -118.37, "y" : 34.086 },
"attributes" : {
"OWNER" : "John Doe",
"VALUE" : 17325.90,
"APPROVED" : false,
"LASTUPDATE" : 1227628579430
}
}
]
I'm now thinking of building a mapper which maps from GeoJSON to ArcGIS JSON but need help with how to map field wise. Any guidance on this please?
I've also seen a thread (Converting ArcGIS Server JSON to GeoJSON?) saying the ArcGIS REST API accepts data in GeoJSON format but it doesn't seem to be the case with the API I'm calling. Does the ArcGIS API accept GeoJSON? If so, I don't have to do the mapping.