From 625f3d70fc5ca728d54b5f2c1dfc50a37a719c61 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Sun, 10 Aug 2025 22:57:16 +0100 Subject: [PATCH] Refine callsign label handling on map Added 'callsign' property to plot data in Logbook_model and updated custom_date.php to use only the 'callsign' for map labels. Simplified and removed aggressive CSS targeting for tooltip classes, ensuring consistent font size and cleaner label rendering. --- application/models/Logbook_model.php | 1 + application/views/map/custom_date.php | 59 ++------------------------- 2 files changed, 5 insertions(+), 55 deletions(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index f44b579e..c4d5bdb4 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -4857,6 +4857,7 @@ class Logbook_model extends CI_Model $plot = array('lat' => 0, 'lng' => 0, 'html' => '', 'label' => '', 'flag' => '', 'confirmed' => 'N'); $plot['label'] = $row->COL_CALL; + $plot['callsign'] = $row->COL_CALL; $flag = strtolower($CI->dxccflag->getISO($row->COL_DXCC)); $plot['flag'] = 'name))) . '"> '; $plot['html'] = ($row->COL_GRIDSQUARE != null ? "Grid: " . $row->COL_GRIDSQUARE . "
" : ""); diff --git a/application/views/map/custom_date.php b/application/views/map/custom_date.php index 636d6413..ebb77544 100644 --- a/application/views/map/custom_date.php +++ b/application/views/map/custom_date.php @@ -1,55 +1,6 @@
@@ -502,9 +451,9 @@ function toggleCallsignLabels() { // Show callsign labels if (typeof plotlayers !== 'undefined' && plotlayers.length > 0) { plotlayers.forEach(function(marker) { - if (marker.data && (marker.data.callsign || marker.data.label)) { - // Use callsign if available, otherwise fall back to label - const callsign = marker.data.callsign || marker.data.label; + if (marker.data && marker.data.callsign) { + // Only create labels when callsign is specifically provided + const callsign = marker.data.callsign; // Try a different approach - create a DivIcon instead of tooltip const labelIcon = L.divIcon({