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(