From 51dab688050523bf2bbd3f21e346f947b5ef9341 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Fri, 8 Dec 2017 05:40:21 +0100 Subject: [PATCH] watch position over time instead of getCurrent --- view/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/main.js b/view/main.js index 781263c..ecf34f7 100755 --- a/view/main.js +++ b/view/main.js @@ -60,6 +60,6 @@ delete window._router_; /* (4) Get geolocation ---------------------------------------------------------*/ -navigator.geolocation && navigator.geolocation.getCurrentPosition(function(loc){ +navigator.geolocation && navigator.geolocation.watchPosition(function(loc){ gstore.data.loc = [ loc.coords.latitude, loc.coords.longitude ]; }, null, { enableHighAccuracy: true });