Skip to content

Commit 363733d

Browse files
committed
sondehub final
1 parent a125ebb commit 363733d

File tree

6 files changed

+268
-171
lines changed

6 files changed

+268
-171
lines changed

build.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,8 @@ cat jquery* >> mobile.js
2020
VERSION="`git rev-parse --short HEAD`"
2121

2222
# compile the rest
23-
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge gmaps_extentions.js >> mobile.js
2423
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge iscroll.js >> mobile.js
2524
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge chasecar.lib.js | sed "s/{VER}/$VERSION/" >> mobile.js
26-
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge nite-overlay.js >> mobile.js
2725
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge tracker.js >> mobile.js
2826
java -jar "../tools/yuicompressor-2.4.8.jar" --type=js --disable-optimizations --nomunge app.js >> mobile.js
2927

index.html

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,13 @@ <h2><i class="icon-settings rfloat"></i>Settings</h2>
193193
<input type="checkbox" id="opt_hide_horizon">
194194
</div>
195195
</div>
196+
<div class="row option">
197+
<span><b>Hide Titles</b></span>
198+
<div class="switch off" id="sw_hide_titles">
199+
<span class="thumb"></span>
200+
<input type="checkbox" id="opt_hide_titles">
201+
</div>
202+
</div>
196203
<h4>Overlays</h4>
197204
<hr/>
198205
<div class="row option">
@@ -362,14 +369,13 @@ <h3>Report Recovery</h3>
362369
</div>
363370
</div>
364371
<!-- Was 3.31-->
365-
<script src="https://maps.google.com/maps/api/js?v=3.44&libraries=map,common,controls,util,marker,onion,kml,ga,infowindow,stats,poly,overlay,weather,weather_impl,geometry&language=en_us&key=AIzaSyCiFklq0gbg7DqUn81NqYBN17bwgK4YFf0" type="text/javascript"></script>
366372
<script src="https://www.google.com/recaptcha/api.js" async defer></script>
367373
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
368374
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
369375
<script src='https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/Leaflet.fullscreen.min.js'></script>
370376
<link href='https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/leaflet.fullscreen.css' rel='stylesheet' />
371377
<script src="https://unpkg.com/@joergdietrich/leaflet.terminator"></script>
372-
<script type="text/javascript" language="javascript" src="js/gmaps_extentions.js"></script>
378+
<script src="https://xc5dqkj2cgb1.statuspage.io/embed/script.js"></script>
373379
<script type="text/javascript" language="javascript" src="js/jquery-1.12.4-min.js"></script>
374380
<script type="text/javascript" language="javascript" src="js/chasecar.lib.js"></script>
375381
<script type="text/javascript" language="javascript" src="js/iscroll.js"></script>

js/app.js

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ function checkSize() {
334334
// this should hide the address bar on mobile phones, when possible
335335
window.scrollTo(0,1);
336336

337-
if(map) google.maps.event.trigger(map, 'resize');
337+
if(map) map.invalidateSize();
338338
}
339339

340340
window.onresize = checkSize;
@@ -815,6 +815,7 @@ $(window).ready(function() {
815815
"#sw_hide_timebox",
816816
"#sw_hilight_vehicle",
817817
'#sw_hide_horizon',
818+
'#sw_hide_titles',
818819
"#sw_nowelcome",
819820
"#sw_interpolate",
820821
];
@@ -899,6 +900,14 @@ $(window).ready(function() {
899900
showHorizonRings();
900901
}
901902
break;
903+
case "opt_hide_titles":
904+
if(on) {
905+
hideTitles();
906+
}
907+
else {
908+
showTitles();
909+
}
910+
break;
902911
case "opt_layers_aprs":
903912
if(on) map.overlayMapTypes.setAt("1", overlayAPRS);
904913
else map.overlayMapTypes.setAt("1", null);
@@ -973,7 +982,8 @@ $(window).ready(function() {
973982
// list of overlays
974983
var overlayList = [
975984
['Global', [
976-
['rainviewer', 'RainViewer Static'],
985+
['rainviewer', 'RainViewer'],
986+
['rainviewer-coverage', 'RainViewer Coverage'],
977987
]],
978988
['North America', [
979989
['nexrad-n0q-900913', 'NEXRAD Base Reflectivity'],
@@ -1028,9 +1038,14 @@ $(window).ready(function() {
10281038
} catch (err) {};
10291039

10301040
try {
1031-
map.removeLayer(RainRadarAus);
1041+
map.removeLayer(RainRadar);
10321042
} catch (err) {};
10331043

1044+
try {
1045+
map.removeLayer(RainRadarCoverage);
1046+
} catch (err) {};
1047+
1048+
10341049
if(e.hasClass('on')) {
10351050
e.removeClass('on').addClass('off');
10361051
on = 0;
@@ -1042,11 +1057,14 @@ $(window).ready(function() {
10421057
}
10431058

10441059
if(on) {
1045-
if (id.includes("rainviewer")) {
1046-
RainRadarAus.addTo(map);
1060+
if (id == "rainviewer") {
1061+
RainRadar.addTo(map);
1062+
} else if (id == "rainviewer-coverage") {
1063+
RainRadarCoverage.addTo(map);
10471064
} else {
10481065
weatherLayer = L.tileLayer('https://mesonet.agron.iastate.edu/cache/tile.py/1.0.0/' + id + '/{z}/{x}/{y}.png?' + (new Date()).getTime(), {
1049-
opacity: 0.6
1066+
opacity: 0.6,
1067+
attribution: '&copy; <a href="https://mesonet.agron.iastate.edu/">Iowa Environmental Mesonet</a>'
10501068
}).addTo(map);
10511069
}
10521070
}

js/iscroll.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@ IScroll.prototype = {
821821
},
822822

823823
scrollToElement: function (el, time, offsetX, offsetY, easing) {
824-
el = el.nodeType ? el : this.scroller.querySelector(el);
824+
el = el.nodeType ? el : document.querySelectorAll(el)[1];
825825

826826
if ( !el ) {
827827
return;

js/plot_config.js

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -67,44 +67,9 @@ function updateLegend(pos) {
6767
legend.eq(i).text(series.label.replace(/=.*/, "= " + y));
6868
}
6969

70-
if(!polyMarker) {
71-
polyMarker = new L.Marker().addTo(map);
72-
polyMarker.on('click', function (e) {
73-
mapInfoBox_handle_path(e);
74-
});
75-
}
76-
77-
// this loop finds an existing data point, so we can get coordinates
78-
// if the crosshair happens to be over null area, we snap to the previous data point
79-
//
80-
// to snap accurate to the corresponding LatLng, we need to count the number of null data points
81-
// then we remove them form the count and we get the index we need for the positions array
8270
if(follow_vehicle !== null && vehicles[follow_vehicle].positions.length) {
83-
// adjust index for null data points
84-
var null_count = 0;
85-
86-
if(outside && pij !== undefined) {
87-
polyMarker.setLatLng(vehicles[follow_vehicle].prediction_polyline.getPath().getArray()[pij]);
88-
}
89-
else {
90-
var data_ref = vehicles[follow_vehicle].graph_data[0];
91-
92-
if(ij > data_ref.data.length / 2) {
93-
for(i = data_ref.data.length - 1; i > ij; i--) null_count += (data_ref.data[i][1] === null) ? 1 : 0;
94-
null_count = data_ref.nulls - null_count * 2;
95-
} else {
96-
for(i = 0; i < ij; i++) null_count += (data_ref.data[i][1] === null) ? 1 : 0;
97-
null_count *= 2;
98-
}
99-
100-
// update position
101-
ij -= null_count + ((null_count===0||null_count===data_ref.nulls) ? 0 : 1);
102-
if(ij < 0) ij = 0;
103-
104-
polyMarker.setLatLng(vehicles[follow_vehicle].positions[ij]);
105-
}
106-
10771
// set timebox
72+
var date = new Date(pos.x1);
10873
$('#timebox').removeClass('present').addClass('past');
10974
updateTimebox(date);
11075
}

0 commit comments

Comments
 (0)