Merge pull request #1089 from umap-project/lazy-load-tile-layers-thumbnails
Lazy load tile layers thumbnails
This commit is contained in:
commit
6348636324
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),
|
img = L.DomUtil.create('img', '', el),
|
||||||
name = L.DomUtil.create('div', '', el)
|
name = L.DomUtil.create('div', '', el)
|
||||||
img.src = L.Util.template(tilelayer.options.url_template, this.map.demoTileInfos)
|
img.src = L.Util.template(tilelayer.options.url_template, this.map.demoTileInfos)
|
||||||
|
img.loading = 'lazy'
|
||||||
name.textContent = tilelayer.options.name
|
name.textContent = tilelayer.options.name
|
||||||
L.DomEvent.on(
|
L.DomEvent.on(
|
||||||
el,
|
el,
|
||||||
|
|
Loading…
Reference in a new issue