Added player popup

This commit is contained in:
Alexis
2023-10-14 14:32:53 +02:00
parent 1f644d1586
commit c9672206be
4 changed files with 18 additions and 10 deletions

View File

@@ -133,6 +133,14 @@ if ( players ) {
const playerMarker = L.marker(playersPosition, { icon: playerIcon }).addTo(map)
playerMarker.addTo(layerGroups['players'])
const popupContent = `
<strong class="title">
${players.title}
</strong>
<p>${players.description}</p>
`;
playerMarker.bindPopup(popupContent).openPopup();
}
map.fitBounds(layer.getBounds());