Skip to content

Commit

Permalink
Add satellite layer to map
Browse files Browse the repository at this point in the history
  • Loading branch information
kbrandwijk authored Jan 18, 2025
1 parent efbd296 commit 85dad36
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions webui/osmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ def get_rotated_preview(lat: float, lon: float, distance: int, angle: int):

m = folium.Map(zoom_control=False)

url = "https://mt0.google.com/vt/lyrs=s&hl=en&x={x}&y={y}&z={z}&s=Ga"
folium.TileLayer(
tiles=url, name="satellite", attr="Google", overlay=True, show=False, control=True
).add_to(m)
folium.LayerControl().add_to(m)

corners = []
half_diagonal = distance * math.sqrt(2) / 2 # Half the diagonal length of the square
for i in range(4):
Expand Down

0 comments on commit 85dad36

Please sign in to comment.