Skip to content

Commit

Permalink
Widget update.
Browse files Browse the repository at this point in the history
  • Loading branch information
iwatkot committed Dec 20, 2024
1 parent f8f794d commit 15987a0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions webui/osmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -47,6 +47,9 @@ def get_rotated_preview(lat: float, lon: float, distance: int, angle: int):
).add_to(m)
folium.ClickForMarker("<b>${lat}, ${lng}</b>").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

Expand Down

0 comments on commit 15987a0

Please sign in to comment.