mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-19 22:35:17 +03:00
further work on map functionality
This commit is contained in:
parent
46d077e240
commit
ed005f23bb
4 changed files with 26 additions and 10 deletions
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
"permissions": [
|
"permissions": [
|
||||||
"https://www.google-analytics.com/",
|
"https://www.google-analytics.com/",
|
||||||
|
"https://maps.googleapis.com/*",
|
||||||
"https://*.github.com/",
|
"https://*.github.com/",
|
||||||
"https://*.githubusercontent.com/",
|
"https://*.githubusercontent.com/",
|
||||||
"http://*.baseflight.net/",
|
"http://*.baseflight.net/",
|
||||||
|
|
|
@ -27,8 +27,7 @@
|
||||||
float: left;
|
float: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-gps #map {
|
.tab-gps #waiting {
|
||||||
height: 100%;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,6 +36,11 @@
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.tab-gps #loadmap {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
progress[value]::-webkit-progress-bar {
|
progress[value]::-webkit-progress-bar {
|
||||||
background-color: #d2d2d2;
|
background-color: #d2d2d2;
|
||||||
|
|
|
@ -147,14 +147,18 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="cf_column half">
|
<div class="cf_column half">
|
||||||
<div class="gui_box grey" style="height: 444px;">
|
<div class="gui_box grey" style="height: 444px;">
|
||||||
|
<div class="gui_box_titlebar">
|
||||||
|
<div class="spacer_box_title" i18n="gpsHead"></div>
|
||||||
|
</div>
|
||||||
<div id="connect" style="display:none; text-align:center;">
|
<div id="connect" style="display:none; text-align:center;">
|
||||||
please check your internet connection
|
please check your internet connection
|
||||||
<div class="default_btn" style="width:50px; margin-left:auto; margin-right:auto; float:none;"><a id="check">retry</a></div>
|
<div class="default_btn" style="width:50px; margin-left:auto; margin-right:auto; float:none;"><a id="check">retry</a></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="map" style="margin-top:0px; display:none;">
|
<div id="waiting" style="margin-top:0px; display:none;">
|
||||||
Online check success! Map can be loaded here!
|
Online check success! Waiting for GPS 3D fix…
|
||||||
<iframe src="tabs/map.html"></iframe>
|
</div>
|
||||||
|
<div id="loadmap" style="margin-top:0px; display:none;">
|
||||||
|
<iframe src="tabs/map.html"></iframe>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
15
tabs/gps.js
15
tabs/gps.js
|
@ -76,23 +76,30 @@ TABS.gps.initialize = function (callback) {
|
||||||
if (navigator.onLine) {
|
if (navigator.onLine) {
|
||||||
console.log('Online');
|
console.log('Online');
|
||||||
$('#connect').hide();
|
$('#connect').hide();
|
||||||
$('#map').show();
|
$('#waiting').show();
|
||||||
|
$('#loadmap').show();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
console.log('Offline');
|
console.log('Offline');
|
||||||
$('#connect').show();
|
$('#connect').show();
|
||||||
$('#map').hide();
|
$('#waiting').hide();
|
||||||
|
$('#loadmap').hide();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#check").on('click',function(){
|
$("#check").on('click',function(){
|
||||||
if (navigator.onLine) {
|
if (navigator.onLine) {
|
||||||
console.log('Online');
|
console.log('Online');
|
||||||
$('#connect').hide();
|
$('#connect').hide();
|
||||||
$('#map').show();
|
$('#waiting').show();
|
||||||
|
$('#loadmap').show();
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
console.log('Offline');
|
console.log('Offline');
|
||||||
$('#connect').show();
|
$('#connect').show();
|
||||||
$('#map').hide();
|
$('#waiting').hide();
|
||||||
|
$('#loadmap').hide();
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue