2025-10-13 00:21:31 +08:00
..
2025-06-15 02:07:00 +08:00
2025-06-14 10:01:19 +08:00
2025-10-13 00:21:31 +08:00
2025-06-14 10:01:19 +08:00
2025-06-14 10:01:19 +08:00
2025-09-28 19:43:26 +08:00
2025-10-13 00:21:31 +08:00
2025-06-14 10:01:19 +08:00

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() - timestamp of 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.