Ashoka74 commited on
Commit
dcfe1c7
·
verified ·
1 Parent(s): 63feda0

Update map.py

Browse files
Files changed (1) hide show
  1. map.py +7 -4
map.py CHANGED
@@ -477,14 +477,13 @@ if my_dataset is not None :
477
  # Update the map config
478
  map_1.config = base_config
479
 
480
- map_1.add_data(
481
- data=parser, name="uap_sightings"
482
- )
483
 
484
  # Find the latitude and longitude columns in the dataframe
485
  lat_col, lon_col = find_lat_lon_columns(parser)
486
-
487
  if lat_col and lon_col:
 
 
488
  # Update the layer configurations
489
  for layer in uap_config['config']['visState']['layers']:
490
  if 'config' in layer and 'columns' in layer['config']:
@@ -499,6 +498,10 @@ if my_dataset is not None :
499
  else:
500
  base_config['config']['visState']['layers'].extend([layer for layer in uap_config['config']['visState']['layers']])
501
  map_1.config = base_config
 
 
 
 
502
 
503
  keplergl_static(map_1, center_map=True)
504
  st.session_state['map_generated'] = True
 
477
  # Update the map config
478
  map_1.config = base_config
479
 
480
+
 
 
481
 
482
  # Find the latitude and longitude columns in the dataframe
483
  lat_col, lon_col = find_lat_lon_columns(parser)
 
484
  if lat_col and lon_col:
485
+ parser[lat_col] = float(parser[lat_col])
486
+ parser[lon_col] = float(parser[lon_col])
487
  # Update the layer configurations
488
  for layer in uap_config['config']['visState']['layers']:
489
  if 'config' in layer and 'columns' in layer['config']:
 
498
  else:
499
  base_config['config']['visState']['layers'].extend([layer for layer in uap_config['config']['visState']['layers']])
500
  map_1.config = base_config
501
+
502
+ map_1.add_data(
503
+ data=parser, name="uap_sightings"
504
+ )
505
 
506
  keplergl_static(map_1, center_map=True)
507
  st.session_state['map_generated'] = True