Lazy load tile layers thumbnails
The list can be pretty big (like on OSMfr).
This commit is contained in:
parent
d0f89c3be2
commit
18cb5ba7c6
1 changed files with 1 additions and 0 deletions
|
@ -975,6 +975,7 @@ L.U.TileLayerControl = L.Control.extend({
|
|||
img = L.DomUtil.create('img', '', el),
|
||||
name = L.DomUtil.create('div', '', el)
|
||||
img.src = L.Util.template(tilelayer.options.url_template, this.map.demoTileInfos)
|
||||
img.loading = 'lazy'
|
||||
name.textContent = tilelayer.options.name
|
||||
L.DomEvent.on(
|
||||
el,
|
||||
|
|
Loading…
Reference in a new issue