From 5ca8a6345a9157a30decea7b3fd4a784c7d89bb8 Mon Sep 17 00:00:00 2001 From: Emillio Mariscal Date: Thu, 14 Dec 2023 18:28:54 -0300 Subject: [PATCH] Fix for project's area / center --- frontend/src/views/projectLiveMonitoring.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/projectLiveMonitoring.js b/frontend/src/views/projectLiveMonitoring.js index 135a3d5a1b..a8e52bb313 100644 --- a/frontend/src/views/projectLiveMonitoring.js +++ b/frontend/src/views/projectLiveMonitoring.js @@ -56,14 +56,18 @@ export function ProjectLiveMonitoring() { const bbox = [ [project.aoiBBOX[0], project.aoiBBOX[1]], [project.aoiBBOX[0], project.aoiBBOX[3]], - [project.aoiBBOX[1], project.aoiBBOX[3]], - [project.aoiBBOX[1], project.aoiBBOX[1]], + [project.aoiBBOX[2], project.aoiBBOX[3]], + [project.aoiBBOX[2], project.aoiBBOX[1]], [project.aoiBBOX[0], project.aoiBBOX[1]], ] setCoords(centroid({ type: "MultiPolygon", coordinates: [[bbox]] - }).geometry.coordinates.reverse()); + }).geometry.coordinates); + console.log(centroid({ + type: "MultiPolygon", + coordinates: [[bbox]] + })) setAreaOfInterest([ bbox[0].join(" "), bbox[1].join(" "),