Constrain map Zoom and bounds
This commit is contained in:
parent
4533956902
commit
fb1ad615d0
9
map.html
9
map.html
|
@ -63,7 +63,14 @@
|
|||
<div id="popupcontainer" class="leaflet-container"></div>
|
||||
<script>
|
||||
(async function() {
|
||||
const map = L.map('map').setView([94.505, -0.09], 13);
|
||||
const map = L.map('map', {
|
||||
minZoom: 12,
|
||||
maxZoom: 21,
|
||||
maxBounds: [
|
||||
[47.517085, -93.427584],
|
||||
[47.457925, -93.340026],
|
||||
],
|
||||
}).setView([94.505, -0.09], 13);
|
||||
// L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
// maxZoom: 19,
|
||||
// attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
|
|
Loading…
Reference in a new issue