From da0e6246ae3bdf9b28897c5fe106478984d8ac8e Mon Sep 17 00:00:00 2001 From: Attila Gazso Date: Wed, 24 Feb 2021 17:37:31 +0100 Subject: [PATCH] add total count of Bee nodes to the top-right corner --- index.html.template | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.html.template b/index.html.template index 72f101f..f2a1770 100644 --- a/index.html.template +++ b/index.html.template @@ -39,8 +39,10 @@ }); var group = [] + var total = 0 for (var key in city) { console.log(city[key]) + total += city[key][2] extra = 0 if (city[key][2] > 0) { lat = city[key][0] @@ -73,6 +75,8 @@ // add POI markers to the map and zoom to the features features = L.featureGroup(group).addTo(map); map.fitBounds(features.getBounds()); + + document.getElementById('overlay').innerHTML = total + ' bee nodes worldwide' } @@ -80,5 +84,6 @@
+