From 4945a8944ae3426239f4e4d784bff680397bbf8a Mon Sep 17 00:00:00 2001 From: jefflac <22205183+JeffLac@users.noreply.github.com> Date: Sun, 9 Mar 2025 15:43:51 -0400 Subject: [PATCH] Fixing long/lat bug - now writing as strings --- src/features/schema/fields/location/LocationBased.jsx | 6 +++--- src/features/schema/fields/location/LocationForm.jsx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/features/schema/fields/location/LocationBased.jsx b/src/features/schema/fields/location/LocationBased.jsx index 770aaac811..6b80d6f369 100644 --- a/src/features/schema/fields/location/LocationBased.jsx +++ b/src/features/schema/fields/location/LocationBased.jsx @@ -312,8 +312,8 @@ export default function LocationBased({ field }) { // Create new state with selected location const newValue = { ...value, - lat: location.lat, - lng: location.lng, + lat: location.lat.toString(), + lng: location.lng.toString(), locality: location.locality || location.formattedName, timezone: location.timezone }; @@ -367,7 +367,7 @@ export default function LocationBased({ field }) { {value && (
Selected: {value.locality} - Coordinates: {value.lat.toFixed(3)}, {value.lng.toFixed(3)} + Coordinates: {value.lat}, {value.lng} Timezone: {value.timezone}
)} diff --git a/src/features/schema/fields/location/LocationForm.jsx b/src/features/schema/fields/location/LocationForm.jsx index 92ccd85074..9def45819b 100644 --- a/src/features/schema/fields/location/LocationForm.jsx +++ b/src/features/schema/fields/location/LocationForm.jsx @@ -263,8 +263,8 @@ export default function LocationForm({ field }) { // Handler for when user selects a location from the dropdown const handleLocationSelect = (location) => { const newValue = { - lat: location.lat, - lng: location.lng, + lat: location.lat.toString(), + lng: location.lng.toString(), locality: location.locality || location.formattedName, timezone: location.timezone }; @@ -291,7 +291,7 @@ export default function LocationForm({ field }) { {value && (
Selected: {value.locality} - Coordinates: {value.lat.toFixed(3)}, {value.lng.toFixed(3)} + Coordinates: {value.lat}, {value.lng} Timezone: {value.timezone}
)}