diff --git a/application/views/gridmap/index.php b/application/views/gridmap/index.php index 264c4c6d..534680ea 100644 --- a/application/views/gridmap/index.php +++ b/application/views/gridmap/index.php @@ -1,3 +1,31 @@ +

diff --git a/assets/js/sections/gridmap.js b/assets/js/sections/gridmap.js index d11df9fe..74986cb9 100644 --- a/assets/js/sections/gridmap.js +++ b/assets/js/sections/gridmap.js @@ -59,6 +59,21 @@ function gridPlot(form) { exportOnly: true, hideControlContainer: true }).addTo(map); + + /*Legend specific*/ + var legend = L.control({ position: "topright" }); + + legend.onAdd = function(map) { + var div = L.DomUtil.create("div", "legend"); + div.innerHTML += "

Gridsquares

"; + div.innerHTML += 'Gridsquares confirmed ('+grid_four_confirmed.length+')
'; + div.innerHTML += 'Gridsquares not confirmed ('+(grid_four.length - grid_four_confirmed.length)+')
'; + div.innerHTML += 'Total gridsquares worked ('+grid_four.length+')
'; + return div; + }; + + legend.addTo(map); + var maidenhead = L.maidenhead().addTo(map); }, error: function (data) {