Skip to content

Instantly share code, notes, and snippets.

@ng-the-engineer
Created May 28, 2021 13:04
Show Gist options
  • Save ng-the-engineer/14d0debba6afc0126bde395feba7ef77 to your computer and use it in GitHub Desktop.
Save ng-the-engineer/14d0debba6afc0126bde395feba7ef77 to your computer and use it in GitHub Desktop.
Code snippet of tutorial build a running tracker
const HIGH_ACCURACY = true;
const MAX_CACHE_AGE_MILLISECOND = 30000;
const MAX_NEW_POSITION_MILLISECOND = 5000;
const trackOptions = {
enableHighAccuracy: HIGH_ACCURACY,
maximumAge: MAX_CACHE_AGE_MILLISECOND,
timeout: MAX_NEW_POSITION_MILLISECOND,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment