代码是 for openlayers写的
在进行地物标记的时候, 将标记的范围保存到数据集中,但是经常会报错500 ,有时又能标注保存成功, 失败几率更大,不知道啥原因?
//这里是绘画结束将绘画的图形保存为feature元素
draw.on('drawend', function (e) {
let range = e.target.sketchCoords_[0]; //图形范围
range.push(range[0])
// 将标记的范围保存为一个polygon要素
let geomOne = new ol.geom.Polygon([range])
pointFeature = new ol.Feature({
geometry: geomOne,
});
pointFeature.setProperties({
id: pointFeature.ol_uid,
type: 'build'
});
addPointsSource.addFeature(pointFeature);
})
// 这里进行提交保存到build数据源下的build数据集中
function commitMark() {
clearInteraction();
var addFeatureParams = new SuperMap.EditFeaturesParameters({
features: pointFeature,
dataSourceName: "build",
dataSetName: "build",
editType: "add",
returnContent: true
});
editFeaturesService.editFeatures(addFeatureParams, function (serviceResult) {
console.log(serviceResult);
});
}
上面是地图编辑的代码
下面是报错
就是这个报错,经常报错,不知道啥原因了, 用户在地图上标注建筑 就半天标注不上?
大佬 求救