ArcGIS Runtime SDK for iOS 100.3 我再一个图层上添加一个点,然后保存在图层上,一直报Attempt to write a readonly database这个错误

- (void)saveFeatureLayer
{
if (!self.selectFeatureLayer) {
return;
}
AGSFeatureTable *featureTable = self.selectFeatureLayer.featureTable;
if (featureTable.canAddFeature) {
AGSFeature *feature = featureTable.createFeature;
AGSGeometry *geometry = self.sketchEditor.geometry;
if (geometry) {
feature.geometry = geometry;
[featureTable addFeature:feature completion:^(NSError * _Nullable error) {
if (!error) {
[self.sketchEditor clearGeometry];
[MSCommon_Tools showLabelWithString:@"要素添加成功" Controller:self AndBlock:nil];
}else{
[MSCommon_Tools showLabelWithString:@"要素添加失败" Controller:self AndBlock:nil];
NSLog(@"error---->%@",error.localizedDescription);
}
}];
}else{
[MSCommon_Tools showLabelWithString:@"请绘制图形后再试" Controller:self AndBlock:nil];
}
}else{
[MSCommon_Tools showLabelWithString:[NSString stringWithFormat:@"要素添加失败,图层:%@不支持编辑",self.selectFeatureLayer.name] Controller:self AndBlock:nil];
}
}
已邀请:

要回复问题请先登录注册