I am trying to send my drawn features with WFS-t to DB. This particular layer has two columns in DB ogc_fid(which is autoincrementing primary key) and wkb_geometry (type geom, which is my geometry column).
1
WFS_transactional_node = new ol.format.WFS().writeTransaction(featuresForInsertion, null , null, {
gmlOptions: {srsName: "EPSG:3765"},
featurePrefix: "test",
featureType: 'test_layer',
});
In featuresForInsertion my features are drawn points which only have geometry property 'wkb_geometry'. Feature looks like this:
[ol.Feature]
0: ol.Feature
dispatching_: {}
geometryChangeKey_: {bindTo: ol.Feature, callOnce: false, listener: ƒ,
target: ol.g…m.MultiPoint, type: "change", …}
geometryName_: "wkb_geometry"
id_: undefined
listeners_: {change:wkb_geometry: Array(2), change: Array(2), propertychange:
Array(2)}
ol_lm: {change:wkb_geometry: Array(2), change: Array(2), propertychange:
Array(2)}
ol_uid: 101
pendingRemovals_: {}
revision_: 3
styleFunction_: undefined
style_: null
values_: {wkb_geometry: ol.g…m.MultiPoint}
__proto__: ol.Object
length: 1
__proto__: Array(0)
When I try to execute chunk of code marked #1 I got error:
Uncaught TypeError: Cannot read property 'wkb_geometry' of undefined
Don't know what am I doing wrong. On some places I have red that geometry property and geometry column name in database has to be same, think I already done it.