Skip to content

Commit

Permalink
refactor: use coordinate precision constant (#1738)
Browse files Browse the repository at this point in the history
  • Loading branch information
tm-ruxandra authored Jul 9, 2024
1 parent 58567d3 commit f5f79ed
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dev-client/src/model/elevation/elevationFunctions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

0 comments on commit f5f79ed

Please sign in to comment.