We came over an error that occures, when editing plugin is used with a pointlayer from geometry type PointZ. Editing of the geometry is not possible in the mapViewer. The console log gets following error in EditingSupport.jsx:137:122:
Uncaught TypeError: t.slice is not a function
e EditingSupport.jsx:137
Rg EditingSupport.jsx:139
Rg EditingSupport.jsx:122
dispatchEvent Target.js:114
handleUpEvent Modify.js:1138
handleEvent Pointer.js:137
handleEvent Modify.js:869
handleMapBrowserEvent Map.js:1153
dispatchEvent Target.js:114
handlePointerUp_ MapBrowserEventHandler.js:208
i events.js:63
handlePointerDown_ MapBrowserEventHandler.js:276
For MulitPointZ features everything works fine. I think the error occurs due to different data representation of PointZ and MulitPointZ coordinates in mapViewer. PointZ is an 'simple' array, MulitPointZ is a 'list of array(s)':
Furthermore the code part to recognize a non zero z-geometry is not working. In image above the Z-value is 475.88, but the variable doesn't update: geomReadOnly: undefined So editing of the point isn't blocked.
if (this.props.editing.geomType.endsWith('Z') && !this.props.editing.geomType.endsWith('PointZ')) {
feature.geometry.coordinates = feature.geometry.coordinates.map(addZCoordinateIfNeeded);
}
if (this.props.editing.geomType.endsWith('PointZ')) {
feature.geometry.coordinates = [feature.geometry.coordinates[0],feature.geometry.coordinates[1],0];
}
The issue with editing point geometry with non-zero z-value remains. As far as I understand the handling of z-values was added here:
https://github.com/qgis/qwc2/commit/c0947426f5d9d613dfff032ce50072080bf76973 and the different representation of coordinates for PointZ and MultiPointZ affects the nonZeroCoordinate function in the same way.
We came over an error that occures, when editing plugin is used with a pointlayer from geometry type PointZ. Editing of the geometry is not possible in the mapViewer. The console log gets following error in EditingSupport.jsx:137:122:
For MulitPointZ features everything works fine. I think the error occurs due to different data representation of PointZ and MulitPointZ coordinates in mapViewer. PointZ is an 'simple' array, MulitPointZ is a 'list of array(s)':
MulitpointZ:
coordinates: [Array(3)] 0: [2675023.836615818, 1246172.218314369, 0]
PointZ:
coordinates: [2675057.0838, 1246721.7189, 475.882995605]
Furthermore the code part to recognize a non zero z-geometry is not working. In image above the Z-value is 475.88, but the variable doesn't update:
geomReadOnly: undefined
So editing of the point isn't blocked.For setting the geometry with Z=0 I tried following code snippet what solved the error message. https://github.com/qgis/qwc2/blame/50f1692ac9ee31064d6b455081d0ec40071c7aa4/plugins/map/EditingSupport.jsx#L137
The issue with editing point geometry with non-zero z-value remains. As far as I understand the handling of z-values was added here: https://github.com/qgis/qwc2/commit/c0947426f5d9d613dfff032ce50072080bf76973 and the different representation of coordinates for PointZ and MultiPointZ affects the
nonZeroCoordinate
function in the same way.