Fix bug with MultiPoint

This commit is contained in:
Nicolò P 2023-03-20 17:41:49 +01:00
parent 0c1b41460c
commit a9f20474b3

View File

@ -252,7 +252,7 @@ DataSpace.getCenterCoordinates = function (geoJSON)
let centerCoords = [coordinates[1], coordinates[0]];
if (geometry !== 'Point') {
if (! geometry.includes('Point')) {
let avX = coordinates[0]
.map(el => el[0])
.reduce((p, c) => p + c) / coordinates[0].length;