From 6c3b3fe6ccdc9fdf65d44106f5766521cef1b0fb Mon Sep 17 00:00:00 2001 From: Ulysses Alvarez Date: Wed, 5 Feb 2025 14:52:20 +0000 Subject: [PATCH] long and lat for NI differences. --- src/server/locations/helpers/location-util.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/server/locations/helpers/location-util.js b/src/server/locations/helpers/location-util.js index 02f6e6d..e253f68 100644 --- a/src/server/locations/helpers/location-util.js +++ b/src/server/locations/helpers/location-util.js @@ -65,11 +65,14 @@ function convertPointToLonLat(matches, location, index) { logger.info( `::::::::::: getNIPlaces 1 matches stringify NI ::::::::::: ${JSON.stringify(matches)}` ) + const long = + matches[index].xCoordinate || matches[index].GAZETTEER_ENTRY.LONGITUDE + const lati = + matches[index].yCoordinate || matches[index].GAZETTEER_ENTRY.LATITUDE + logger.info(`::::::::::: getNIPlaces 1 long NI ::::::::::: ${long}`) + logger.info(`::::::::::: getNIPlaces 1 lati NI ::::::::::: ${lati}`) try { - pointNI = new OsGridRef( - matches[index].xCoordinate, - matches[index].yCoordinate - ) + pointNI = new OsGridRef(long, lati) } catch (error) { logger.error( `Failed to fetch convertPointToLonLat matches