From 429ac634984e59157e77fafe56911c2d97ad19e7 Mon Sep 17 00:00:00 2001 From: David Bell Date: Tue, 1 Mar 2016 15:30:25 +0000 Subject: [PATCH 1/2] Fixed tooltip on geomap. --- html/includes/common/worldmap.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/html/includes/common/worldmap.inc.php b/html/includes/common/worldmap.inc.php index fabda7779..8417a236c 100644 --- a/html/includes/common/worldmap.inc.php +++ b/html/includes/common/worldmap.inc.php @@ -191,7 +191,8 @@ var greenMarker = L.AwesomeMarkers.icon({ $z_offset = 10000; // move marker to foreground } $temp_output .= "var title = '\"\"".$map_devices['hostname']."'; -var marker = L.marker(new L.LatLng(".$map_devices['lat'].", ".$map_devices['lng']."), {title: title, icon: $icon, zIndexOffset: $z_offset}); +var tooltip = '".$map_devices['hostname']."'; +var marker = L.marker(new L.LatLng(".$map_devices['lat'].", ".$map_devices['lng']."), {title: tooltip, icon: $icon, zIndexOffset: $z_offset}); marker.bindPopup(title); markers.addLayer(marker);\n"; } From 566addbfcf8a7a01c3872247940b816653a1df3c Mon Sep 17 00:00:00 2001 From: David Bell Date: Tue, 1 Mar 2016 16:15:49 +0000 Subject: [PATCH 2/2] Added a space in popup to make it look a bit prettier --- html/includes/common/worldmap.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html/includes/common/worldmap.inc.php b/html/includes/common/worldmap.inc.php index 8417a236c..ddaad352a 100644 --- a/html/includes/common/worldmap.inc.php +++ b/html/includes/common/worldmap.inc.php @@ -190,7 +190,7 @@ var greenMarker = L.AwesomeMarkers.icon({ $icon = 'redMarker'; $z_offset = 10000; // move marker to foreground } - $temp_output .= "var title = '\"\"".$map_devices['hostname']."'; + $temp_output .= "var title = '\"\" ".$map_devices['hostname']."'; var tooltip = '".$map_devices['hostname']."'; var marker = L.marker(new L.LatLng(".$map_devices['lat'].", ".$map_devices['lng']."), {title: tooltip, icon: $icon, zIndexOffset: $z_offset}); marker.bindPopup(title);