From ef424da41152ab907900ff4fbc0eeca1e7e411cc Mon Sep 17 00:00:00 2001 From: Sebastian Neuner Date: Tue, 13 Oct 2015 16:46:31 +0200 Subject: [PATCH] world map: move markers to foreground for hosts that are down --- html/includes/common/worldmap.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/html/includes/common/worldmap.inc.php b/html/includes/common/worldmap.inc.php index b89e9a3ca..fdec3fc26 100644 --- a/html/includes/common/worldmap.inc.php +++ b/html/includes/common/worldmap.inc.php @@ -123,11 +123,13 @@ var greenMarker = L.AwesomeMarkers.icon({ } foreach (dbFetchRows($sql, array($_SESSION['user_id'])) as $map_devices) { $icon = 'greenMarker'; + $z_offset = 0; if ($map_devices['status'] == 0) { $icon = 'redMarker'; + $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}); +var marker = L.marker(new L.LatLng(".$map_devices['lat'].", ".$map_devices['lng']."), {title: title, icon: $icon, zIndexOffset: $z_offset}); marker.bindPopup(title); markers.addLayer(marker);\n"; }