This commit is contained in:
a-ill
2023-06-26 23:50:59 +03:00
parent 8b1f218b8d
commit 01748c4020
2 changed files with 7 additions and 3 deletions

View File

@@ -15,10 +15,14 @@
function createMap(center,zoom) {
let map = L.map(mapContainer, {
center: center,
zoom: zoom
zoom: zoom,
});
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
minNativeZoom: 2,
minZoom: 2,
maxNativeZoom: 16,
maxZoom: 16,
}).addTo(map);
return map
}