From 18cb5ba7c694fe2269ea97a432078ff21a328514 Mon Sep 17 00:00:00 2001 From: David Larlet Date: Thu, 18 May 2023 12:54:36 -0400 Subject: [PATCH] Lazy load tile layers thumbnails The list can be pretty big (like on OSMfr). --- umap/static/umap/js/umap.controls.js | 1 + 1 file changed, 1 insertion(+) diff --git a/umap/static/umap/js/umap.controls.js b/umap/static/umap/js/umap.controls.js index dcb569f9..8e35d0a1 100644 --- a/umap/static/umap/js/umap.controls.js +++ b/umap/static/umap/js/umap.controls.js @@ -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,