Changed variable names

Because the map will eventually be used for everything, not just one continent
This commit is contained in:
Alexis
2023-10-11 20:32:55 +02:00
parent 657e824a80
commit 73cc730a5c
5 changed files with 10 additions and 10 deletions

View File

@@ -9,13 +9,15 @@ interface Props {
const { markers, players } = Astro.props
---
<div id="map"></div>
<div class="world-wrapper">
<div id="world"></div>
</div>
<script lang="ts" define:vars={{ markers, players }}>
const mapHeight = 15168;
const mapWidth = 14658;
const map = L.map('map', {
const map = L.map('world', {
crs: L.CRS.Simple,
maxZoom: 12,
minZoom: 2.5,
@@ -121,8 +123,6 @@ const { markers, players } = Astro.props
const playerMarker = L.marker(playersPosition, { icon: playerIcon }).addTo(map)
playerMarker.addTo(layerGroups['players'])
console.log(map)
}
map.fitBounds(layer.getBounds());