Created
March 27, 2015 12:14
-
-
Save yauh/89f785012426bfc5c180 to your computer and use it in GitHub Desktop.
prev and curr position
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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