Skip to content

Commit f904b06

Browse files
authored
Merge pull request projecthorus#183 from LukePrior/testing
Bug fixes
2 parents 2388db7 + b7a75d7 commit f904b06

File tree

5 files changed

+25
-106
lines changed

5 files changed

+25
-106
lines changed

index.html

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<title>SondeHub Tracker</title>
66
<meta name="description" content="Live tracking of radiosonde flights. Data via SondeHub v2. Includes weather overlay, predictions, and access to historic radiosonde flights on sondehub." />
77
<meta name="author" content="Rossen Georgiev / Mark Jessop / Michaela Wheeler / Luke Prior" />
8-
<link rel="search" type="application/opensearchdescription+xml" href="opensearchspec.xml" title="Search on Sondebhub Tracker">
8+
<link rel="search" type="application/opensearchdescription+xml" href="opensearchspec.xml" title="Search on SondeHub Tracker">
99
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1"/>
1010
<meta name="apple-mobile-web-app-title" content="SondeHub Tracker">
1111
<meta name="apple-mobile-web-app-capable" content="yes" />
@@ -205,38 +205,22 @@ <h2><i class="icon-settings rfloat"></i>Settings</h2>
205205
<input type="checkbox" id="opt_hide_titles">
206206
</div>
207207
</div>
208-
<h4>Overlays</h4>
209-
<hr/>
210-
<div class="row option">
211-
<span><b>Daylight overlay</b></span>
212-
<div class="switch off" id="sw_daylight">
213-
<span class="thumb"></span>
214-
<input type="checkbox" id="opt_daylight">
215-
</div>
216-
</div>
217-
<h4>Other</h4>
218-
<hr/>
219208
<div class="row option">
220209
<span><b>Hide Launch Sites</b></span>
221210
<div class="switch off" id="sw_layers_launches">
222211
<span class="thumb"></span>
223212
<input type="checkbox" id="opt_layers_launches">
224213
</div>
225214
</div>
215+
<h4>Overlays</h4>
216+
<hr/>
226217
<div class="row option">
227-
<span><b>Force check for new version</b></span>
228-
<div class="switch off" id="sw_cache">
218+
<span><b>Daylight overlay</b></span>
219+
<div class="switch off" id="sw_daylight">
229220
<span class="thumb"></span>
230-
<input type="checkbox" id="opt_cache">
221+
<input type="checkbox" id="opt_daylight">
231222
</div>
232223
</div>
233-
<div class="row info">
234-
<span>
235-
Reloads appcache if necessary.
236-
The size of cache files is 1.2 MB.
237-
This does not include map tiles.
238-
</span>
239-
</div>
240224
</div>
241225
</div>
242226
<div id="weatherbox" style="display: none" class="flatpage">

js/app.js

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -181,27 +181,6 @@ for(var idx in params) {
181181
}
182182
}
183183

184-
$.ajaxSetup({ cache: true });
185-
186-
var force_check_cache = false;
187-
188-
// handle cachin events and display a loading bar
189-
var loadComplete = function(e) {
190-
clearTimeout(initTimer);
191-
192-
if(e.type == 'updateready') {
193-
// swapCache may throw exception if the isn't a previous cache
194-
try {
195-
window.applicationCache.swapCache();
196-
} catch(v) {}
197-
198-
window.location.reload();
199-
return;
200-
}
201-
202-
$('#loading .complete').stop(true,true).animate({width: 200}, {complete: trackerInit });
203-
};
204-
205184
// loads the tracker interface
206185
function trackerInit() {
207186
$('#loading,#settingsbox,#aboutbox,#chasebox').hide(); // welcome screen
@@ -224,21 +203,6 @@ function trackerInit() {
224203
// if for some reason, applicationCache is not working, load the app after a 3s timeout
225204
var initTimer = setTimeout(trackerInit, 3000);
226205

227-
var cache = window.applicationCache;
228-
// TEMPORARILY DISABLED - MJ 2020-08-29
229-
// Application Cache is broken in recent chrome versions/
230-
// Disabling these addEventListener calls at least makes the rest of the page load.
231-
// Unsure what the implications of disabling these are.
232-
233-
//cache.addEventListener('noupdate', loadComplete, false);
234-
//cache.addEventListener('updateready', loadComplete, false);
235-
//cache.addEventListener('cached', loadComplete, false);
236-
//cache.addEventListener('error', loadComplete, false);
237-
238-
// if the browser supports progress events, display a loading bar
239-
//cache.addEventListener('checking', function() { if(map && !force_check_cache) return; force_check_cache = false; clearTimeout(initTimer); $('#loading .bar,#loading').show(); $('#loading .complete').css({width: 0}); }, false);
240-
//cache.addEventListener('progress', function(e) { $('#loading .complete').stop(true,true).animate({width: (200/e.total)*e.loaded}); }, false);
241-
242206
var listScroll;
243207
var GPS_ts = null;
244208
var GPS_lat = null;
@@ -875,22 +839,6 @@ $(window).ready(function() {
875839
if(offline.get(opt_name)) $(switch_id).removeClass('off').addClass('on');
876840
}
877841

878-
// force re-cache
879-
$('#sw_cache').click(function() {
880-
var e = $(this).removeClass('off').addClass('on');
881-
if(confirm("The app will automatically reload, if new version is available.")) {
882-
force_check_cache = true;
883-
884-
try {
885-
applicationCache.update();
886-
} catch (v) {
887-
force_check_cache = false;
888-
alert("There is no applicationCache available");
889-
}
890-
}
891-
e.removeClass('on').addClass('off');
892-
});
893-
894842
// We are able to get GPS position on idevices, if the user allows
895843
// The position is displayed in top right corner of the screen
896844
// This should be very handly for in the field tracking

js/tracker.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2311,7 +2311,20 @@ function addPosition(position) {
23112311
marker = new L.Marker(point, {
23122312
title: vcallsign,
23132313
zIndexOffset: Z_CAR,
2314-
}).addTo(map).on('click', onClick);
2314+
});
2315+
2316+
if(!!!window.HTMLCanvasElement) {
2317+
carIcon = L.icon({
2318+
iconUrl: image_src,
2319+
iconSize: image_src_size,
2320+
iconAnchor: [27.22],
2321+
tooltipAnchor: [0,-32],
2322+
});
2323+
marker.setIcon(new carIcon);
2324+
} else {
2325+
marker_rotate_setup(marker, image_src);
2326+
}
2327+
marker.addTo(map).on('click', onClick);
23152328

23162329
// Scroll list stuff here.
23172330
function onClick(e) {
@@ -2325,18 +2338,6 @@ function addPosition(position) {
23252338
refreshSingleNew(_vehicle_id);
23262339
};
23272340

2328-
if(!!!window.HTMLCanvasElement) {
2329-
carIcon = L.icon({
2330-
iconUrl: image_src,
2331-
iconSize: image_src_size,
2332-
iconAnchor: [27.22],
2333-
tooltipAnchor: [0,-32],
2334-
});
2335-
marker.setIcon(new carIcon);
2336-
} else {
2337-
marker_rotate_setup(marker, image_src);
2338-
}
2339-
marker.addTo(map);
23402341
polyline = [
23412342
new L.Polyline(point, {
23422343
color: car_colors[color_index],

opensearchspec.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?xml version="1.0"?>
22
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
3-
<ShortName>Habhub Tracker</ShortName>
4-
<Description>Habhub Tracker - Search</Description>
3+
<ShortName>SondeHub Tracker</ShortName>
4+
<Description>SondeHub Tracker - Search</Description>
55
<InputEncoding>UTF-8</InputEncoding>
66
<Contact>[email protected]</Contact>
7-
<Image height="16" width="16" type="image/x-icon">https://tracker.habhub.org/favicon.ico</Image>
8-
<Developer>Rossen Georgiev</Developer>
9-
<Url type="text/html" method="get" template="https://tracker.habhub.org/#!qm=All&amp;q={searchTerms}" />
7+
<Image height="16" width="16" type="image/x-icon">https://sondehub.org/favicon.ico</Image>
8+
<Developer>Luke Prior</Developer>
9+
<Url type="text/html" method="get" template="https://sondehub.org/#!f={searchTerms}&amp;mz=9&amp;qm=All&amp;q={searchTerms}" />
1010
</OpenSearchDescription>

track.kml

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)