From d951835920c91b7b3e6780ceb231f877cb2969cd Mon Sep 17 00:00:00 2001 From: GLASER-OPITZ HENRICH Date: Sun, 6 Oct 2024 21:37:11 +0200 Subject: [PATCH] examples: modification of geodesic calcualtion to display the map --- examples/geodesic.py | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/examples/geodesic.py b/examples/geodesic.py index efb1b15..51b5228 100644 --- a/examples/geodesic.py +++ b/examples/geodesic.py @@ -7,7 +7,7 @@ """ -# import folium +import folium from pyBADA import conversions as conv from pyBADA import geodesic as geo @@ -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="Haversine", -# tooltip="Haversine", -# icon=folium.Icon(color="red"), -# ).add_to(myMap) -# folium.Marker( -# destPoint_vincenty, -# popup="Vincenty", -# tooltip="Vincenty", -# icon=folium.Icon(color="blue"), -# ).add_to(myMap) +folium.Marker(initPoint).add_to(myMap) +folium.Marker( + destPoint_haversine, + popup="Haversine", + tooltip="Haversine", + icon=folium.Icon(color="red"), +).add_to(myMap) +folium.Marker( + destPoint_vincenty, + popup="Vincenty", + 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