Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -1347,11 +1347,11 @@ def generate_map(location_names):
|
|
1347 |
for location_name in all_addresses:
|
1348 |
geocode_result = gmaps.geocode(location_name)
|
1349 |
if geocode_result:
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
|
1356 |
map_html = m._repr_html_()
|
1357 |
return map_html
|
|
|
1347 |
for location_name in all_addresses:
|
1348 |
geocode_result = gmaps.geocode(location_name)
|
1349 |
if geocode_result:
|
1350 |
+
location = geocode_result[0]['geometry']['location']
|
1351 |
+
folium.Marker(
|
1352 |
+
[location['lat'], location['lng']],
|
1353 |
+
tooltip=f"{geocode_result[0]['formatted_address']}"
|
1354 |
+
).add_to(m)
|
1355 |
|
1356 |
map_html = m._repr_html_()
|
1357 |
return map_html
|