Hajk
Hajk copied to clipboard
Edit Plugin: Cannot edit empty layers if the geometry name is not 'geom'
Describe the bug In the Edit plugin the geometryName of the feature being edited is taken from the first feature in the layer being edited. If there are not features it defaults to 'geom'.
Current process:
- Use the geometry name of the first feature.
- If there are no features default to 'geom'.
This means that it is currently not possible to edit empty layers if the geometry name is not 'geom'.
Suggested fix Add the possibility to set a geometryField on wfst layers that will be used if there are no features to get the geometry name from (The same as is done for wfs search layers)
New process:
- Use the geometry name of the first feature.
- If there are no features check if there is a 'geometryField' setting on the edit layer config.
- Finally, default to 'geom'.