Reduce maxAge to 5 seconds for fresher location updates
This commit is contained in:
parent
d8e21b8cdf
commit
6d55e1c5a9
|
|
@ -8,7 +8,7 @@ interface UseLocationSharingOptions {
|
||||||
updateInterval?: number;
|
updateInterval?: number;
|
||||||
/** Enable high accuracy mode (uses more battery) */
|
/** Enable high accuracy mode (uses more battery) */
|
||||||
highAccuracy?: boolean;
|
highAccuracy?: boolean;
|
||||||
/** Maximum age of cached position in ms (default: 30000) */
|
/** Maximum age of cached position in ms (default: 5000) - lower = fresher positions */
|
||||||
maxAge?: number;
|
maxAge?: number;
|
||||||
/** Timeout for position request in ms (default: 30000) */
|
/** Timeout for position request in ms (default: 30000) */
|
||||||
timeout?: number;
|
timeout?: number;
|
||||||
|
|
@ -38,7 +38,7 @@ export function useLocationSharing(
|
||||||
onLocationUpdate,
|
onLocationUpdate,
|
||||||
updateInterval = 5000,
|
updateInterval = 5000,
|
||||||
highAccuracy = true,
|
highAccuracy = true,
|
||||||
maxAge = 30000,
|
maxAge = 5000, // Allow cached position up to 5 seconds old
|
||||||
timeout = 30000,
|
timeout = 30000,
|
||||||
} = options;
|
} = options;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue