Demo

Pan the two maps below and observe that the blank background underneath the tiles is less likely to be seen when using the EdgeBuffer plugin.

Without EdgeBuffer

Standard EdgeBuffer Usage (1 Tile)

Usage

Add the script to your document. E.g.

<script src="./leaflet.edgebuffer.js"></script>

Add the edgeBufferTiles property to your tiled map layers. The value is the minimum number of tiles to load outside of the visible area. Fractional values are permitted. E.g.

var openStreetMap = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
  edgeBufferTiles: 1
})

See https://github.com/TolonUK/Leaflet.EdgeBuffer for the code and to download.