Allow wrapped map panning
This commit is contained in:
1 parent
8179c17e22
commit
8d92d64fa3
1 file changed
-6
@@ -876,18 +876,12 @@
|
|||||||
function initMap() {
|
function initMap() {
|
||||||
map = L.map("map", {
|
map = L.map("map", {
|
||||||
worldCopyJump: true,
|
worldCopyJump: true,
|
||||||
maxBounds: [
|
|
||||||
[-85, -180],
|
|
||||||
[85, 180],
|
|
||||||
],
|
|
||||||
maxBoundsViscosity: 1.0,
|
|
||||||
}).setView([46.8182, 8.2275], 8);
|
}).setView([46.8182, 8.2275], 8);
|
||||||
L.tileLayer(
|
L.tileLayer(
|
||||||
"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
|
"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
|
||||||
{
|
{
|
||||||
attribution:
|
attribution:
|
||||||
'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
|
'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
|
||||||
noWrap: true,
|
|
||||||
},
|
},
|
||||||
).addTo(map);
|
).addTo(map);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user