cap positions on map at 15 for station view

This commit is contained in:
KF7EEL 2021-03-05 08:16:24 -08:00 committed by GitHub
parent 45deeaf142
commit 03919a4bdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -206,6 +206,7 @@ def view_map():
map_size = request.args.get('map_size')
user_loc = ast.literal_eval(os.popen('cat ' + loc_file).read())
last_known_list = []
coord_list = []
try:
if track_call:
#folium_map = folium.Map(location=map_center, zoom_start=int(zoom_level))
@ -320,6 +321,7 @@ def view_map():
if 'W' in user_coord['lon']:
user_lon = -user_lon
loc_comment = ''
coord_list.append([user_lat, user_lon])
if 'comment' in user_coord:
loc_comment = """
<tr>
@ -351,6 +353,9 @@ def view_map():
</i>""", icon=folium.Icon(color="red", icon="record"), tooltip=str(user_coord['call'])).add_to(folium_map)
last_known_list.append(user_coord['call'])
if user_coord['call'] in last_known_list:
if coord_list.count([user_lat, user_lon]) > 15:
pass
else:
folium.CircleMarker([user_lat, user_lon], popup="""
<table style="width: 150px;">
<tbody>