From e9ea11c5332668af16c0497bf2b578433b05b32f Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Wed, 28 Oct 2020 16:19:38 +0000 Subject: List by country and added to map --- bh20simplewebuploader/static/main.js | 8 -------- bh20simplewebuploader/static/map.js | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) (limited to 'bh20simplewebuploader/static') diff --git a/bh20simplewebuploader/static/main.js b/bh20simplewebuploader/static/main.js index 6e63ed3..89bc603 100644 --- a/bh20simplewebuploader/static/main.js +++ b/bh20simplewebuploader/static/main.js @@ -66,13 +66,6 @@ function fetchHTMLTable(apiEndPoint) { .then(data => { console.log(data) htmlString="" - - // Depending on what we want to explore we'd have to call a different function ....? But how to Include that? - /* - for (var i=0; i" - } - */ for (var i=0; i { let m = document.getElementById('search-input').value; diff --git a/bh20simplewebuploader/static/map.js b/bh20simplewebuploader/static/map.js index cabb63d..c01659f 100644 --- a/bh20simplewebuploader/static/map.js +++ b/bh20simplewebuploader/static/map.js @@ -86,7 +86,7 @@ function buildMapMarkers(data) { }}}); // ---- Build the marker list for (let i = 0; i < data.length; i++) { - let {"count": fastaCount, GPS, LocationLabel: label } = data[i]; + let {"count": fastaCount, GPS, Location: location, LocationLabel: label } = data[i]; let countSeq = Number(fastaCount); let coordinates = GPS.split(" "); @@ -95,7 +95,7 @@ function buildMapMarkers(data) { [lon, lat] = coordinates.map(parseFloat); let point = L.point() marker = new seqMarker([lat, lon],markerOptions={title: fastaCount+" sequences",sequences: countSeq}); - marker.bindPopup("" + label + "
" + "SARS-CoV-2
sequences: " +fastaCount); + marker.bindPopup("" + label + "
" + "SARS-CoV-2
sequences: " +fastaCount + ""); markers.addLayer(marker); } } -- cgit v1.2.3
"+data[i]["label"]+""+data[i]["count"]+"