mgokg commited on
Commit
2d04d45
·
verified ·
1 Parent(s): 95e8d06

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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[0]['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="{maps_external_url}"
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);"