Spaces:
Running
Running
LaurentTRIPIED
commited on
Commit
•
9a800ac
1
Parent(s):
b73754a
Pytorch V0.26
Browse files- localisation.py +5 -3
localisation.py
CHANGED
@@ -24,9 +24,11 @@ def get_data():
|
|
24 |
def display_map(data):
|
25 |
m = folium.Map(location=[44.837789, -0.57918], zoom_start=12)
|
26 |
for item in data:
|
27 |
-
|
28 |
-
|
29 |
-
if lat and lon:
|
|
|
|
|
30 |
folium.Marker(
|
31 |
[lat, lon],
|
32 |
icon=folium.Icon(color="green", icon="leaf"),
|
|
|
24 |
def display_map(data):
|
25 |
m = folium.Map(location=[44.837789, -0.57918], zoom_start=12)
|
26 |
for item in data:
|
27 |
+
lat = item.get('latitude')
|
28 |
+
lon = item.get('longitude')
|
29 |
+
if lat is not None and lon is not None:
|
30 |
+
# Convertir en float au cas où les données sont des strings
|
31 |
+
lat, lon = float(lat), float(lon)
|
32 |
folium.Marker(
|
33 |
[lat, lon],
|
34 |
icon=folium.Icon(color="green", icon="leaf"),
|