From 69b1c3eb39b681a72e301833bba67410790d6a0c Mon Sep 17 00:00:00 2001 From: Ruxandra Machedon Date: Tue, 9 Jul 2024 12:21:39 -0400 Subject: [PATCH] refactor: use coordinate precision constant --- dev-client/src/model/elevation/elevationFunctions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dev-client/src/model/elevation/elevationFunctions.ts b/dev-client/src/model/elevation/elevationFunctions.ts index bd5b19dbe..3b9085c27 100644 --- a/dev-client/src/model/elevation/elevationFunctions.ts +++ b/dev-client/src/model/elevation/elevationFunctions.ts @@ -17,8 +17,9 @@ import {Coords} from 'terraso-client-shared/types'; +import {COORDINATE_PRECISION} from 'terraso-mobile-client/constants'; import {ElevationKey} from 'terraso-mobile-client/model/elevation/elevationTypes'; export const elevationKey = (coords: Coords): ElevationKey => { - return `(${coords.longitude.toFixed(5)}, ${coords.latitude.toFixed(5)})` as ElevationKey; + return `(${coords.longitude.toFixed(COORDINATE_PRECISION)}, ${coords.latitude.toFixed(COORDINATE_PRECISION)})` as ElevationKey; };