From ece87f5c2419180cd2d322b5d5b916495e14393c Mon Sep 17 00:00:00 2001 From: Qiusheng Wu Date: Fri, 12 Jul 2024 09:52:13 -0700 Subject: [PATCH] Improve layer manager gui --- leafmap/toolbar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/leafmap/toolbar.py b/leafmap/toolbar.py index 478b1e5ea..de5193c9c 100644 --- a/leafmap/toolbar.py +++ b/leafmap/toolbar.py @@ -6184,7 +6184,7 @@ def all_layers_chk_changed(change): all_layers_chk.observe(all_layers_chk_changed, "value") - layers = [lyr for lyr in m.layers] + layers = [lyr for lyr in m.layers if lyr.name] # if the layers contain unsupported layers (e.g., GeoJSON, GeoData), adds the ipyleaflet built-in LayerControl if len(layers) < (len(m.layers) - 1):