Leaflet plugin to support pre-loading tiles outside the current viewport. It will be compatible with Leaflet master once a change to support a GridLayer tile bounds hook is merged.
Include Leaflet.EdgeBuffer.js
, then add edgeBufferTiles: 1
to the options of layers you wish to have an edge buffer.
- edgeBufferTiles: (number) The number of tiles that should be loaded beyond the edge of the map viewport. This may be a fractional number. Default to undefined, which disabled the feature.
This demo shows two maps, one without this plugin active and one with.
Leaflet.loading is free software and may be redistributed under the MIT License.