Skip to content

Instantly share code, notes, and snippets.

@yauh
Created March 27, 2015 12:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yauh/89f785012426bfc5c180 to your computer and use it in GitHub Desktop.
Save yauh/89f785012426bfc5c180 to your computer and use it in GitHub Desktop.
prev and curr position
Tracker.autorun( function () {
currentPosition = Geolocation.currentLocation();
if (currentPosition === null) {
return;
}
else if (previousPosition === null) { // avoid previousPosition being null
previousPosition = currentPosition;
}
previousPosition = currentPosition;
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment