leaflet.js disable duplicated world maps

后端 未结 1 1792
陌清茗
陌清茗 2021-02-18 15:41

We need to disable duplicated world maps at the left and right side of the main world map, which is showing by default. Problem is that we need exact zoom level there and someti

1条回答
  •  一整个雨季
    2021-02-18 16:14

    You will disable the noWrap property of your TiledLayer (which extends GridLayer). Documentation here

    var layer = new L.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {
        noWrap: true
    });
    

    0 讨论(0)
提交回复
热议问题