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