Added player popup
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user