项目文件夹

文件
wehub-resource-sync 2114b14ee0
Sync main into demo / sync (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:35:26 +08:00

634 B

Location Service

Use LocationService instead of navigator.geolocation.

The simulator location can be deterministic, preset by benchmark setup, or configured to simulate errors. This keeps map/search/weather tasks reproducible.

Typical app rule:

import * as LocationService from '@/os/LocationService';

LocationService.getCurrentPosition(
  (position) => {
    const { latitude, longitude } = position.coords;
  },
  (error) => {
    console.warn(error.message);
  },
);

Benchmarks and debug tooling control location through __SIM_LOCATION__.

See the service index for broader context: README.md.