From 2151e441c47fde7db40625fa32199bbdb6308fdf Mon Sep 17 00:00:00 2001 From: Ian Renton Date: Thu, 16 Oct 2025 22:31:08 +0100 Subject: [PATCH] Map tweaks #42 --- views/webpage_map.tpl | 3 ++- views/webpage_spots.tpl | 1 + webassets/js/map.js | 44 ++++++-------------------------------- webassets/js/spotandmap.js | 38 ++++++++++++++++++++++++++++++++ webassets/js/spots.js | 39 --------------------------------- 5 files changed, 48 insertions(+), 77 deletions(-) create mode 100644 webassets/js/spotandmap.js diff --git a/views/webpage_map.tpl b/views/webpage_map.tpl index 361bb91..155c881 100644 --- a/views/webpage_map.tpl +++ b/views/webpage_map.tpl @@ -108,7 +108,7 @@
Map Features
- +
@@ -130,5 +130,6 @@ + \ No newline at end of file diff --git a/views/webpage_spots.tpl b/views/webpage_spots.tpl index c12e669..b29a213 100644 --- a/views/webpage_spots.tpl +++ b/views/webpage_spots.tpl @@ -238,5 +238,6 @@ + \ No newline at end of file diff --git a/webassets/js/map.js b/webassets/js/map.js index 65570a2..d57aff2 100644 --- a/webassets/js/map.js +++ b/webassets/js/map.js @@ -1,10 +1,6 @@ -// How often to query the server? -const REFRESH_INTERVAL_SEC = 60; - -// Storage for the spot data that the server gives us. -var spots = [] -// Marker layer +// Map layers var markersLayer; +var terminator; // Load spots and populate the table. function loadSpots() { @@ -13,6 +9,7 @@ function loadSpots() { spots = jsonData; // Update map updateMap(); + terminator.setTime(); }); } @@ -79,36 +76,9 @@ function loadOptions() { }); } -// Dynamically add CSS code for the band bullets and band toggle buttons to be in the appropriate colour. -// Some band names contain decimal points which are not allowed in CSS classes, so we text-replace them to "p". -function addBandColourCSS(band_options) { - var $style = $('