aboutsummaryrefslogtreecommitdiff
path: root/bh20simplewebuploader/static
diff options
context:
space:
mode:
authorPjotr Prins2020-07-17 09:59:32 +0100
committerPjotr Prins2020-07-17 09:59:32 +0100
commit06e3922a5541641077b18016e272cddc7e50205b (patch)
tree951ad8f893161ef92e0928e3a6980234e01d58cb /bh20simplewebuploader/static
parent7565f72b1bf0d70426947a50d1b9a62edc48071d (diff)
downloadbh20-seq-resource-06e3922a5541641077b18016e272cddc7e50205b.tar.gz
bh20-seq-resource-06e3922a5541641077b18016e272cddc7e50205b.tar.lz
bh20-seq-resource-06e3922a5541641077b18016e272cddc7e50205b.zip
Map refactoring, now shows on HOME
Diffstat (limited to 'bh20simplewebuploader/static')
-rw-r--r--bh20simplewebuploader/static/map.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/bh20simplewebuploader/static/map.js b/bh20simplewebuploader/static/map.js
index e1a4289..8b8ecba 100644
--- a/bh20simplewebuploader/static/map.js
+++ b/bh20simplewebuploader/static/map.js
@@ -31,6 +31,7 @@ function drawMap(){
radius: parseInt(data[i]["count"]) //not working for whatever reason
}).addTo(mymap);
}
+ // updateMapMarkers(data);
});
document.getElementById("map_view").classList.remove("invisible");
@@ -42,11 +43,11 @@ function drawMap(){
/* This function updates the map with markers
*
*/
-function updateMapMarkers() {
+function updateMapMarkers(data) {
// markers.clearLayers(); // remove all markers
// document.getElementById("results").classList.remove("invisible");
- document.getElementById("loader").classList.add("invisible");
- /*
+ // document.getElementById("loader").classList.add("invisible");
+
for (let i = 0; i < data.length; i++) {
let {"count": fastaCount, GPS, LocationLabel: label } = data[i];
let coordinates = GPS.split(" ");
@@ -57,10 +58,11 @@ function updateMapMarkers() {
let marker = L.marker([lat, lon]);
marker.bindPopup("<b>" + label + "</b><br/>" + "FastaCount: " +fastaCount);
// markers.addLayer(marker)
- }}
- */
+ }
+ }
+
// Reload the map
- map.invalidateSize();
+ // map.invalidateSize();
// document.getElementById("map_view").classList.add("invisible");
// document.getElementById("loader").classList.add("invisible");
}