A leaflet plugin for pre-loading map tiles that are outside the current viewport
npm install leaflet-edgebufferInclude Leaflet.EdgeBuffer.js. By default, a 1 tile buffer will be added beyond the viewport. To define a different buffer size use the options below.
- edgeBufferTiles: (number) The number of tiles that should be loaded beyond the edge of the map viewport. This may be a fractional number. Defaults to 1.
This demo shows two maps, one without this plugin active and one with.
- https://tolonuk.github.io/Leaflet.EdgeBuffer/
This plugin does not currently work with the GoogleMutant plugin. See issues https://gitlab.com/IvanSanchez/Leaflet.GridLayer.GoogleMutant/issues/27 and https://github.com/TolonUK/Leaflet.EdgeBuffer/issues/10.
Leaflet.EdgeBuffer is free software and may be redistributed under the MIT
License.
[Leaflet]: https://github.com/Leaflet/Leaflet