Usage

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

Signatures

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

Parameters

NameTypeRequiredDescription
optionsLastKnownPositionOptionsNo—
Default: {}

Returns

Promise<Fix>

Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.