Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Created July 15, 2017 20:39
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 matthieu-D/0e2703502a79f15c14e928fec09d1a23 to your computer and use it in GitHub Desktop.
Save matthieu-D/0e2703502a79f15c14e928fec09d1a23 to your computer and use it in GitHub Desktop.
handleMovement = (coords) => {
const distanceMoved = this.getDistanceFromLatLonInKm(
this.originalCoords.latitude,
this.originalCoords.longitude,
coords.latitude,
coords.longitude)
if (distanceMoved > this.DISTANCE_TO_MOVE && this.notificationAlreadyReceived === false) {
this.showNotification();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment