ashok2216 commited on
Commit
65b73f1
·
verified ·
1 Parent(s): e3acf1b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -7
app.py CHANGED
@@ -368,7 +368,7 @@ def flight_tracking(flight_view_level, country, local_time_zone, flight_info, ai
368
 
369
  # Filter airports for the selected country and within the view bounds
370
  airport_country_loc = airport_locations[
371
- (airport_locations['Country'].str.contains(str(loc[0]), case=False, na=False)) &
372
  (airport_locations['Latitude'] >= lat_min) &
373
  (airport_locations['Latitude'] <= lat_max) &
374
  (airport_locations['Longitude'] >= lon_min) &
@@ -376,7 +376,7 @@ def flight_tracking(flight_view_level, country, local_time_zone, flight_info, ai
376
  ]
377
 
378
  # Get traffic data
379
- geo_df = get_traffic_gdf(lat_min, lat_max, lon_min, lon_max, local_time_zone, loc, flight_info)
380
  if geo_df is None:
381
  return
382
 
@@ -519,11 +519,13 @@ def flight_tracking(flight_view_level, country, local_time_zone, flight_info, ai
519
  icon=folium.Icon(icon='plane', prefix='fa', color='blue'),
520
  popup=folium.Popup(
521
  f"""
522
- <div style="font-size: 14px; font-family: Arial, sans-serif;">
523
- <b>{row['Name']}</b><br>
524
- IATA: {row['IATA/FAA']}<br>
525
- City: {row['City']}<br>
526
- Country: {row['Country']}
 
 
527
  </div>
528
  """,
529
  max_width=300
 
368
 
369
  # Filter airports for the selected country and within the view bounds
370
  airport_country_loc = airport_locations[
371
+ (airport_locations['Country'].str.contains(str(country), case=False)) &
372
  (airport_locations['Latitude'] >= lat_min) &
373
  (airport_locations['Latitude'] <= lat_max) &
374
  (airport_locations['Longitude'] >= lon_min) &
 
376
  ]
377
 
378
  # Get traffic data
379
+ geo_df = get_traffic_gdf(lat_min, lat_max, lon_min, lon_max, local_time_zone, country, flight_info)
380
  if geo_df is None:
381
  return
382
 
 
519
  icon=folium.Icon(icon='plane', prefix='fa', color='blue'),
520
  popup=folium.Popup(
521
  f"""
522
+ <div style='font-family: Arial, sans-serif;'>
523
+ <h4 style='margin: 0;'>{row['Name']}</h4>
524
+ <p style='margin: 5px 0;'>
525
+ <b>IATA:</b> {row['IATA/FAA']}<br>
526
+ <b>City:</b> {row['City']}<br>
527
+ <b>Country:</b> {row['Country']}
528
+ </p>
529
  </div>
530
  """,
531
  max_width=300