From b2ea6e2554bdfcc873806057ca32a29fc3acea8a Mon Sep 17 00:00:00 2001 From: Frank <33519926+Conengmo@users.noreply.github.com> Date: Fri, 18 Nov 2022 11:49:20 +0100 Subject: [PATCH] In _to_png use fullscreen window (#1656) --- folium/folium.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folium/folium.py b/folium/folium.py index 2730bc61f..77dc1ee19 100644 --- a/folium/folium.py +++ b/folium/folium.py @@ -344,7 +344,7 @@ def _to_png(self, delay=3, driver=None): with temp_html_filepath(html) as fname: # We need the tempfile to avoid JS security issues. driver.get(f"file:///{fname}") - driver.maximize_window() + driver.fullscreen_window() time.sleep(delay) div = driver.find_element("class name", "folium-map") png = div.screenshot_as_png