【问题原因】请求地址和请求参数设置有误.
【解决方案】请求地址类似:http://localhost:8090/iserver/services/data-QianYiCeShi/arcgisrest/postgres_public_127_0_0_1_5432/FeatureServer/applyEdits而不是http://localhost:8090/iserver/services/data-QianYiCeShi/arcgisrest/postgres_public_127_0_0_1_5432/FeatureServer/0/addFeatures;请求参数构建类似:edits=[
{
"id" : 0,
"adds" : [
{
"geometry" : {
"x": -143.501,
"y": 57.043000000000006
},
"attributes": {
"datetime": 1272210710000,
"depth": 31.100000000000001,
"region": "Andreanof Islands, Aleutian Islands, Alaska"
}
},
{
"geometry": {
"x": -72.865099999999927,
"y": -37.486599999999953
},
"attributes": {
"datetime": 1272210142999,
"depth": "40.x",
"region": "Bio-Bio, Chile"
}
}
],
"updates": [
{
"geometry": {
"x": -149.450,
"y": 60.120
},
"attributes": {
"OBJECTID": 50,
"datetime": 1272210710000,
"region": "Andreanof Islands, Aleutian Islands, Alaska"
}
}
],
"deletes": [
19,23
]
},
{
"id": 1,
"deletes": [
34,44
]
}
]
而不是features:[{"geometry": {"x": -25.6855034055977,"y": 479.5604384659638},"attributes": {"ADDRESS": "65","SMUSERID": "0","NAME": "65"}}]