From c18690a19e27a2ca6c85c436640ad3ef19d3bcc6 Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Sun, 5 Jan 2025 23:32:55 -0500 Subject: [PATCH] Pass state in `to_html` --- lonboard/_map.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lonboard/_map.py b/lonboard/_map.py index 928228cd..4d081e7c 100644 --- a/lonboard/_map.py +++ b/lonboard/_map.py @@ -545,6 +545,9 @@ def inner(fp): title=title or "Lonboard export", template=_HTML_TEMPLATE, drop_defaults=False, + # Necessary to pass the state of _this_ specific map. Otherwise, the + # state of all known widgets will be included, ballooning the file size. + state=self.get_state(), ) if filename is None: