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