Skip to content

Commit

Permalink
Merge pull request #505 from DEFRA/bookmark-english-northern-ireland-…
Browse files Browse the repository at this point in the history
…49-rebase

long and lat for NI differences.
  • Loading branch information
ulysses-cognizant authored Feb 5, 2025
2 parents 53a7fb0 + 6c3b3fe commit e1dcf43
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/server/locations/helpers/location-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e1dcf43

Please sign in to comment.