Merge pull request #1089 from umap-project/lazy-load-tile-layers-thumbnails

Lazy load tile layers thumbnails
This commit is contained in:
Yohan Boniface 2023-05-19 11:24:25 +02:00 committed by GitHub
commit 6348636324
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,