Resolved issues reported during testing of #7655.

This commit is contained in:
Pravesh Sharma
2024-10-18 13:05:59 +05:30
committed by GitHub
parent f819841430
commit 4d7fc8be52

View File

@@ -68,7 +68,7 @@ function parseEwkbData(rows, column) {
let value = item[key];
let buffer = Buffer.from(value, 'hex');
let geometry = WkxGeometry.parse(buffer);
if (isNaN(geometry.x) || isNaN(geometry.y)){
if (((isNaN(geometry.x) || isNaN(geometry.y)) && !(_.isNil(geometry.x) && _.isNil(geometry.y)))){
unsupportedRows.push(item);
return true;
}
@@ -200,7 +200,7 @@ function PopupTable({data}) {
return (
<tr key={row.column}>
<td className={'GeometryViewer-tableCell ' + 'GeometryViewer-tableCellHead'}>{row.column}</td>
<td className='GeometryViewer-tableCell'>{row.value}</td>
<td className='GeometryViewer-tableCell'>{`${row.value}`}</td>
</tr>
);
})}
@@ -313,7 +313,7 @@ function TheMap({data}) {
if (this.options.maxLength > 0) {
this._map.fitBounds(this.options.homeCoordinates);
} else {
this._map.setView(this.options.homeCoordinates.getCenter(), this.options.homeZoom);
this.options.homeCoordinates && this._map.setView(this.options.homeCoordinates.getCenter(), this.options.homeZoom);
}
};
@@ -326,7 +326,7 @@ function TheMap({data}) {
options.homeCoordinates = homeCoordinates.current?.bounds;
}
if (options.homeZoom === null) {
options.homeZoom = map.getBoundsZoom(homeCoordinates.current?.bounds);
options.homeZoom = homeCoordinates.current?.bounds ? map.getBoundsZoom(homeCoordinates.current?.bounds) : 0;
}
if(options.maxLength === null) {
options.maxLength = homeCoordinates.current?.maxLength;