Skip to content

Commit bb8c937

Browse files
Mark JessopMark Jessop
authored andcommitted
Fix some more review comments
1 parent a6b488a commit bb8c937

File tree

3 files changed

+6
-57
lines changed

3 files changed

+6
-57
lines changed

index.template.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ <h3><i class="icon-habhub rfloat"></i>Report Recovery</h3>
130130
</div>
131131
<div class="row">
132132
<span>
133-
<!--<input type="text" id="pr_notes" style="width: 140px;"/>-->
134133
<textarea name="pr_notes" id="pr_notes" style="width:280px;height:60px;"></textarea>
135134
</span>
136135
</div>

js/sondehub.js

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -641,61 +641,6 @@ var baseMaps = {
641641

642642
var selectedLayer = "Mapnik";
643643

644-
// Tile load analytics - 2023-01-09
645-
// This code allows us to get some understanding of total tile loads across all users.
646-
var tile_loads = {
647-
"Mapnik": 0,
648-
"DarkMatter": 0,
649-
"WorldImagery": 0,
650-
"Terrain": 0,
651-
"Voyager": 0,
652-
"OpenTopoMap": 0,
653-
"HighSight": 0
654-
}
655-
656-
// Add handlers to eadh tileload event to simply increment a counter.
657-
// We don't need any more data than this.
658-
osm.on('tileload', function() { tile_loads["Mapnik"]++ });
659-
dark_matter.on('tileload', function() { tile_loads["DarkMatter"]++ });
660-
worldimagery.on('tileload', function() { tile_loads["WorldImagery"]++ });
661-
stamen_terrain.on('tileload', function() { tile_loads["Terrain"]++ });
662-
cartodb_voyager.on('tileload', function() { tile_loads["Voyager"]++ });
663-
opentopomap.on('tileload', function() { tile_loads["OpenTopoMap"]++ });
664-
highSight.on('tileload', function() { tile_loads["HighSight"]++ });
665-
666-
667-
var last_sent_tile_loads = {}
668-
669-
// Disabled 2025-02-04
670-
// setInterval(function(){
671-
672-
// temp_tile_loads = Object.assign({},tile_loads);
673-
674-
// // Check if the tile load count has changed.
675-
// // Using JSON stringify is a bit of a hack, but appropriate for this kind of job.
676-
// if(JSON.stringify(last_sent_tile_loads) == JSON.stringify(temp_tile_loads)){
677-
// // Tile loads havent changed, do nothing,
678-
// } else {
679-
// // Tile loads have changed. Update the store, and send the data.
680-
// last_sent_tile_loads = Object.assign({},tile_loads);
681-
682-
// // Send!
683-
684-
// $.ajax({
685-
// type: "PUT",
686-
// url: "https://api.v2.sondehub.org/tiles/count",
687-
// contentType: "application/json; charset=utf-8",
688-
// dataType: "json",
689-
// data: JSON.stringify({'client': clientID, 'tile_loads': last_sent_tile_loads}),
690-
// });
691-
// }
692-
693-
// }, 60000)
694-
695-
696-
697-
698-
699644

700645
// set map if in memory
701646
var maplayer = offline.get("map")

js/station.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ function drawHistorical (data, station) {
212212
html += "<hr style='margin:0px;margin-top:5px'>";
213213
html += "</div>";
214214

215-
html += "<div><b>Show Full Flight Path: <b><a href=\"javascript:showRecoveredMap('" + serial + "')\">" + serial + "</a></div>";
215+
html += "<div><b>Show Full Flight Path:&nbsp;</b><a href='#' class='recovery_path'></a></div>";
216216

217217
html += "<hr style='margin:0px;margin-top:5px'>";
218218
html += "<div style='font-size:11px;'>"
@@ -224,6 +224,11 @@ function drawHistorical (data, station) {
224224
div.innerHTML = html;
225225

226226

227+
div.getElementsByClassName("recovery_path")[0].textContent = serial
228+
div.getElementsByClassName("recovery_path")[0].onclick = function(){
229+
showRecoveredMap(serial)
230+
}
231+
227232
if (recovered) {
228233
_recovered_text = recovery_info.recovered ? " Recovered" : "Not Recovered";
229234

0 commit comments

Comments
 (0)