From 5e4c7c3d0070405faba89a8e298b647e0ce1ec1d Mon Sep 17 00:00:00 2001 From: Samuel Vermeulen Date: Mon, 20 Jan 2025 00:07:14 +0100 Subject: [PATCH] Improvement --- GEOMAPpy.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/GEOMAPpy.py b/GEOMAPpy.py index 2517f86..a0a95c3 100755 --- a/GEOMAPpy.py +++ b/GEOMAPpy.py @@ -10,14 +10,17 @@ def get_location(address): return location.latitude, location.longitude adresse = input("Entrez une adresse : ") -lat, long = get_location(adresse) +lat, lon = get_location(adresse) # Créer une carte centrée autour de la localisation -m = folium.Map(location=[lat, long], zoom_start=15) +m = folium.Map(location=[lat, lon], zoom_start=15) # Ajouter un marqueur à la carte -folium.Marker([lat, long], popup=adresse).add_to(m) +folium.Marker( + [lat, lon], + popup="

"+adresse+"

"+str([lat, lon])+"

" + ).add_to(m) # Sauvegarder la carte dans un fichier HTML et afficher les coordonnées m.save("map.html") -print(f"Coordonnées de l'adresse {adresse} : {lat}, {long}") \ No newline at end of file +print(f"Coordonnées de l'adresse {adresse} : {lat}, {lon}") \ No newline at end of file