"Les données structurées et leur traitement"


pip install geopy

import folium
from geopy.geocoders import Nominatim
geolocator = Nominatim(user_agent="my-application")
location = geolocator.geocode("8 rue jean de la Fontaine 22590 Pordic")
print(location.address)
print((location.latitude, location.longitude))
m = folium.Map(location=[location.latitude, location.longitude],zoom_start=13)
tooltip = 'Click me!'

folium.Marker([location.latitude, location.longitude], popup='Mt. Hood Meadows', tooltip=tooltip).add_to(m)
m.save('index.html')

Avec des cercles

folium.Circle(
    radius=100,
    location=[45.5244, -122.6699],
    popup='The Waterfront',
    color='crimson',
    fill=False,
).add_to(m)
location1 = geolocator.geocode("8 rue jean de la Fontaine 22590 Pordic")
location2 = geolocator.geocode("eglise plerin")
points=[(location1.latitude, location1.longitude),(location2.latitude, location2.longitude)]
folium.PolyLine(points).add_to(my_map)

isnbreizh.fr