From ed005f23bb385ff7808834f62aadb278efe1941a Mon Sep 17 00:00:00 2001 From: skaman82 Date: Tue, 17 Nov 2015 10:27:54 +0100 Subject: [PATCH] further work on map functionality --- manifest.json | 1 + tabs/gps.css | 8 ++++++-- tabs/gps.html | 12 ++++++++---- tabs/gps.js | 15 +++++++++++---- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/manifest.json b/manifest.json index 348c7939..5f6d24ea 100644 --- a/manifest.json +++ b/manifest.json @@ -25,6 +25,7 @@ "permissions": [ "https://www.google-analytics.com/", + "https://maps.googleapis.com/*", "https://*.github.com/", "https://*.githubusercontent.com/", "http://*.baseflight.net/", diff --git a/tabs/gps.css b/tabs/gps.css index c003b05c..5fe96efd 100644 --- a/tabs/gps.css +++ b/tabs/gps.css @@ -27,8 +27,7 @@ float: left; } -.tab-gps #map { - height: 100%; +.tab-gps #waiting { width: 100%; } @@ -37,6 +36,11 @@ width: 100%; } +.tab-gps #loadmap { + height: 100%; + width: 100%; +} + progress[value]::-webkit-progress-bar { background-color: #d2d2d2; diff --git a/tabs/gps.html b/tabs/gps.html index b4335d2d..483f8699 100644 --- a/tabs/gps.html +++ b/tabs/gps.html @@ -147,14 +147,18 @@
+
+
+
- diff --git a/tabs/gps.js b/tabs/gps.js index e6cd8aaf..b5c28843 100644 --- a/tabs/gps.js +++ b/tabs/gps.js @@ -76,23 +76,30 @@ TABS.gps.initialize = function (callback) { if (navigator.onLine) { console.log('Online'); $('#connect').hide(); - $('#map').show(); + $('#waiting').show(); + $('#loadmap').show(); + } else { console.log('Offline'); $('#connect').show(); - $('#map').hide(); + $('#waiting').hide(); + $('#loadmap').hide(); + } $("#check").on('click',function(){ if (navigator.onLine) { console.log('Online'); $('#connect').hide(); - $('#map').show(); + $('#waiting').show(); + $('#loadmap').show(); } else { console.log('Offline'); $('#connect').show(); - $('#map').hide(); + $('#waiting').hide(); + $('#loadmap').hide(); + } });