From d593e897f5913c052fcb2ef511c3f3a39fa75d25 Mon Sep 17 00:00:00 2001 From: Stefano Ricci Date: Fri, 15 Nov 2024 11:11:53 +0100 Subject: [PATCH] fixed map layout centering --- .../GeoAttributeDataLayer/convertDataToGeoJsonPoints.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/webapp/views/App/views/Data/MapView/GeoAttributeDataLayer/convertDataToGeoJsonPoints.js b/webapp/views/App/views/Data/MapView/GeoAttributeDataLayer/convertDataToGeoJsonPoints.js index bfdb42fb07..f351e9a442 100644 --- a/webapp/views/App/views/Data/MapView/GeoAttributeDataLayer/convertDataToGeoJsonPoints.js +++ b/webapp/views/App/views/Data/MapView/GeoAttributeDataLayer/convertDataToGeoJsonPoints.js @@ -75,15 +75,17 @@ export const convertDataToGeoJsonPoints = ({ data, attributeDef, nodeDefParent, if (!point) return acc + const { x, y } = point + const properties = { ...extractCommonProperties({ dataItem, parentEntityColumn, ancestorsKeysColumns, i18n }), - point: PointFactory.createInstance({ x: point.x, y: point.y }), + point: PointFactory.createInstance({ x, y }), ...extraProperties, } - const pointFeature = GeoJsonUtils.createPointFeature({ x: point.x, y: point.y, properties }) + const pointFeature = GeoJsonUtils.createPointFeature({ x, y, properties }) - acc.bounds.extend([point.x, point.y]) + acc.bounds.extend([point.y, point.x]) acc.points.push(pointFeature) acc.pointIndexByDataIndex[index] = acc.points.length - 1