Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -67,14 +67,14 @@ def search_with_maps(user_query):
|
|
| 67 |
# We use maps.google.com with output=embed.
|
| 68 |
# Note: We prioritize the first location found for the embed preview
|
| 69 |
# because the legacy embed doesn't handle list searches well.
|
| 70 |
-
primary_location = locations[
|
| 71 |
embed_src = f"https://maps.google.com/maps?q={quote(primary_location)}&t=&z=13&ie=UTF8&iwloc=&output=embed"
|
| 72 |
|
| 73 |
# Create HTML with embedded map and location list src="{embed_src}"
|
| 74 |
map_html = f"""
|
| 75 |
<div style="width: 100%; display: flex; flex-direction: column; gap: 10px;">
|
| 76 |
<iframe
|
| 77 |
-
src="{
|
| 78 |
width="100%"
|
| 79 |
height="450"
|
| 80 |
style="border:0; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);"
|
|
|
|
| 67 |
# We use maps.google.com with output=embed.
|
| 68 |
# Note: We prioritize the first location found for the embed preview
|
| 69 |
# because the legacy embed doesn't handle list searches well.
|
| 70 |
+
primary_location = locations[1]['title']
|
| 71 |
embed_src = f"https://maps.google.com/maps?q={quote(primary_location)}&t=&z=13&ie=UTF8&iwloc=&output=embed"
|
| 72 |
|
| 73 |
# Create HTML with embedded map and location list src="{embed_src}"
|
| 74 |
map_html = f"""
|
| 75 |
<div style="width: 100%; display: flex; flex-direction: column; gap: 10px;">
|
| 76 |
<iframe
|
| 77 |
+
src="{embed_src}"
|
| 78 |
width="100%"
|
| 79 |
height="450"
|
| 80 |
style="border:0; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);"
|