Skip to content

Commit

Permalink
OnlineMap: Chat Stations are displayed in the lowest map layer
Browse files Browse the repository at this point in the history
  • Loading branch information
foldynl committed Sep 12, 2023
1 parent b344c31 commit 4daa97c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion res/map/onlinemap.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@
padding: 5px;
font-weight: bold;
}
.leaflet-tooltip.chat-tooltip {
border-radius: 20px;
background-color: transparent;
padding: 5px;
font-weight: bold;
}
</style>
</head>

Expand All @@ -56,6 +62,11 @@

var map = L.map('map', {center: [0,0], zoom: 2, minZoom: 1});

map.createPane('lowestPane');
map.getPane('lowestPane').style.zIndex = 200;
map.getPane('lowestPane').style.pointerEvents = 'none';


// green Icon definition. It is usually used for confirmed QSOs
const greenIcon = new L.Icon({
iconUrl: 'https://raw.githubusercontent.com/pointhi/leaflet-color-markers/master/img/marker-icon-2x-green.png',
Expand Down Expand Up @@ -392,7 +403,7 @@
chatStationsLayer.clearLayers();
points.forEach(function(point) {
let marker = new L.marker([point[1], point[2]], {opacity: 0.001 });
marker.bindTooltip(point[0], {permanent: true, direction : 'bottom', offset: [-16, 8], className: 'muf-tooltip' });
marker.bindTooltip(point[0], {pane: 'lowestPane', permanent: true, direction : 'bottom', offset: [-16, 8], className: 'chat-tooltip' });
marker.on('dblclick', chatCallsignPressed);
marker.callsign = point[0];
marker.getTooltip().setContent(`<div style="background-color: aqua;border-radius: 20px;padding: 5px;font-weight: bold;">${marker.getTooltip().getContent()}</div>`);
Expand Down

0 comments on commit 4daa97c

Please sign in to comment.