location.last
The fix the platform last had, at once; null without one that meets options.
Verwendung
Use a recent cached position.
// Use a recent cached position.
import { location } from 'kuito';
const fix = await location.last({ maxAge: 60_000, requiredAccuracy: 100 });
if (fix) console.log(fix.coords.latitude, fix.coords.longitude); // null without a fresh enough fixSignaturen
(options?: LastKnownPositionOptions): Promise<LocationObject | null>Parameter
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
options | LastKnownPositionOptions | Nein | — Standard: {} |
Rückgabe
Promise<Fix>
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.