Verwendung

Use a recent cached position.

tsx
// 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 fix

Signaturen

ts
(options?: LastKnownPositionOptions): Promise<LocationObject | null>

Parameter

NameTypErforderlichBeschreibung
optionsLastKnownPositionOptionsNein—
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.