leaflet.js disable duplicated world maps

leaflet

Solution

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
});

Problem

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 sometimes leaflet showing duplicates... Is it possible to remove duplicates at all?

Original source