From da90401b2daa6622412c1e090a33568aae1b7df8 Mon Sep 17 00:00:00 2001 From: Eli Ribble Date: Fri, 8 May 2026 22:48:51 +0000 Subject: [PATCH] Push location config to client We'll let the default stay the default. --- ts/rmo/components/AddressAndMapLocator.vue | 7 ++++++- ts/store/location.ts | 10 +++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ts/rmo/components/AddressAndMapLocator.vue b/ts/rmo/components/AddressAndMapLocator.vue index 0fd964f3..9c2a2836 100644 --- a/ts/rmo/components/AddressAndMapLocator.vue +++ b/ts/rmo/components/AddressAndMapLocator.vue @@ -174,8 +174,13 @@ function updateModel( emit("update:modelValue", newLocator); } onMounted(() => { + const geo_config = { + enableHighAccuracy: true, + maximumAge: Infinity, + timeout: 10000, + }; storeLocation - .get() + .get(geo_config) .then((loc: GeolocationPosition) => { console.log("user geolocation", loc); const coords = loc.coords; diff --git a/ts/store/location.ts b/ts/store/location.ts index 4dbe7c4b..6c3df4cf 100644 --- a/ts/store/location.ts +++ b/ts/store/location.ts @@ -15,11 +15,15 @@ export const useStoreLocation = defineStore("location", () => { } // Default options if none provided - const geolocationOptions = options || { + const geolocationOptions = + options || + { + /* enableHighAccuracy: true, - timeout: 5000, + timeout: 60000, maximumAge: 0, - }; + */ + }; // Call the geolocation API navigator.geolocation.getCurrentPosition(