Created with Capacitor Create App
This app was created using @capacitor/create-app,
and comes with a very minimal shell for building an app.
Running this example
To run the provided example, you can use npm start command.
npm start
Notes on getLatestPosition()
- The example now reflects the plugin's updated behavior:
getLatestPosition()attempts a fresh one-shot location fix and falls back to the last cached snapshot on failure/timeout. - The UI logs additional diagnostics:
_elapsedMs: total call duration (includes waiting up to ~3000ms for a fresh fix)._ageMs:Date.now() - timestampof the returned position._guessedFresh: a simple heuristic based on the two numbers above to hint whether the result is likely fresh.
- Make sure to grant location permissions and enable location services for meaningful results.