From 3521c10a497098dc4fc517405b176feca7818cb5 Mon Sep 17 00:00:00 2001 From: Keith Irwin Date: Sun, 7 May 2017 03:18:38 -0400 Subject: [PATCH] #79 Added timestamp to in-browser location setting --- static/js/map-controls.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/static/js/map-controls.js b/static/js/map-controls.js index 6542466..e48845d 100644 --- a/static/js/map-controls.js +++ b/static/js/map-controls.js @@ -15,6 +15,7 @@ $(function(){ // Success callback function(pos){ var newloc = { + ts: Date.now(), tok: token, usr: userid, lat: pos.coords.latitude, @@ -54,6 +55,7 @@ $(function(){ // Success callback function(pos) { newloc = { + ts: Date.now(), tok: token, usr: userid, lat: pos.coords.latitude, @@ -96,13 +98,14 @@ $(function(){ else { // Stop tracking if (wpid) { - $('#track-loc').html(' Track'); + $('#track-loc').html('Track'); navigator.geolocation.clearWatch(wpid); wpid = undefined; } // Clear location newloc = { + ts: Date.now(), tok: token, usr: userid, lat:0, lon:0, spd:0