From dc167766fa3c52c416933b1a039288ea7baa8afa Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Thu, 7 Dec 2017 22:36:04 +0100 Subject: [PATCH] tmp: geolocation to test through https (must push to master) sorry .. --- view/main.js | 7 ++++++- view/vue-config.js | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/view/main.js b/view/main.js index 4ad6a15..4e094b6 100755 --- a/view/main.js +++ b/view/main.js @@ -55,4 +55,9 @@ window._router_ = router; require('./websocket'); /* (3) Remove global ref to router */ -delete window._router_; \ No newline at end of file +delete window._router_; + + +/* (4) Get geolocation +---------------------------------------------------------*/ +navigator.geolocation && navigator.geolocation.getCurrentPosition(function(a, b){ console.log(this, a, b); }, null); diff --git a/view/vue-config.js b/view/vue-config.js index 2329ece..58a9eff 100644 --- a/view/vue-config.js +++ b/view/vue-config.js @@ -137,4 +137,7 @@ gstore.add('msg_pending', { }); // true when message send pending // notification stack visibility -gstore.add('nstack', false); \ No newline at end of file +gstore.add('nstack', false); + +// location +gstore.add('loc', [0, 0]); \ No newline at end of file