featureLayer.applyEdits在esri javascript API中保存POINT EMPTY

时间:2016-05-30 04:35:45

标签: javascript esri

esri javascript API featureLayer.applyEdits一段时间工作,大部分时间在Geometry中保存POINT EMPTY并使用Null值设置其余属性 这是代码

 featureLayer.applyEdits(drawnItems, null, null, function (add, update, del) {
                console.log(JSON.stringify(drawnItems[0].attributes));
                ContaminantLayer.refresh();
                if(add[0].success===true)
                {
                  console.log("Success");
                }
             else {
                    toastr.error("Error occured ");
                }
            }, function (error) {
                toastr.error("Error occured ");

            });

1 个答案:

答案 0 :(得分:0)

我发现了这个问题,我需要在保存Geometry之前使用Simplify()

https://developers.arcgis.com/javascript/3/jsapi/esri.geometry.geometryengine-amd.html#simplify