From 15987a03b2e8697ddfa6937812c102b35f6de185 Mon Sep 17 00:00:00 2001 From: Stan Soldatov Date: Fri, 20 Dec 2024 02:53:40 +0100 Subject: [PATCH] Widget update. --- webui/osmp.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/webui/osmp.py b/webui/osmp.py index 6828a1d..a721621 100644 --- a/webui/osmp.py +++ b/webui/osmp.py @@ -20,8 +20,8 @@ def get_rotated_preview(lat: float, lon: float, distance: int, angle: int): str: Path to the HTML file. """ save_path = get_rotated_save_path(lat, lon, distance, angle) - # if os.path.isfile(save_path): - # return save_path + if os.path.isfile(save_path): + return save_path m = folium.Map(zoom_control=False) @@ -47,6 +47,9 @@ def get_rotated_preview(lat: float, lon: float, distance: int, angle: int): ).add_to(m) folium.ClickForMarker("${lat}, ${lng}").add_to(m) + center = get_center(bbox) + folium.CircleMarker(center, radius=1, color=color, fill=True).add_to(m) + m.save(save_path) return save_path