Skip to content

Commit

Permalink
examples: modification of geodesic calcualtion to display the map
Browse files Browse the repository at this point in the history
  • Loading branch information
henrich14 committed Oct 6, 2024
1 parent 7d690a7 commit d951835
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions examples/geodesic.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"""

# import folium
import folium

from pyBADA import conversions as conv
from pyBADA import geodesic as geo
Expand Down Expand Up @@ -129,23 +129,26 @@
vincentyLine.append(destPoint_vincenty)

# draw the lines on the map
# folium.PolyLine(haversineLine, color="red", weight=2).add_to(myMap)
# folium.PolyLine(vincentyLine, color="blue", weight=2).add_to(myMap)
folium.PolyLine(haversineLine, color="red", weight=2).add_to(myMap)
folium.PolyLine(vincentyLine, color="blue", weight=2).add_to(myMap)

# add markers on the map
# folium.Marker(initPoint).add_to(myMap)
# folium.Marker(
# destPoint_haversine,
# popup="<i>Haversine</i>",
# tooltip="Haversine",
# icon=folium.Icon(color="red"),
# ).add_to(myMap)
# folium.Marker(
# destPoint_vincenty,
# popup="<i>Vincenty</i>",
# tooltip="Vincenty",
# icon=folium.Icon(color="blue"),
# ).add_to(myMap)
folium.Marker(initPoint).add_to(myMap)
folium.Marker(
destPoint_haversine,
popup="<i>Haversine</i>",
tooltip="Haversine",
icon=folium.Icon(color="red"),
).add_to(myMap)
folium.Marker(
destPoint_vincenty,
popup="<i>Vincenty</i>",
tooltip="Vincenty",
icon=folium.Icon(color="blue"),
).add_to(myMap)

# saving the map in the HTML file. This map then can be viewed in the browser and you can interact with it
# myMap.save("map_geodesic.html")

# display the map
myMap

0 comments on commit d951835

Please sign in to comment.