watch position over time instead of getCurrent

This commit is contained in:
xdrm-brackets 2017-12-08 05:40:21 +01:00
parent d534f1f37c
commit 51dab68805
1 changed files with 1 additions and 1 deletions

View File

@ -60,6 +60,6 @@ delete window._router_;
/* (4) Get geolocation /* (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 ]; gstore.data.loc = [ loc.coords.latitude, loc.coords.longitude ];
}, null, { enableHighAccuracy: true }); }, null, { enableHighAccuracy: true });