cap positions on map at 15 for station view
This commit is contained in:
parent
247168d567
commit
ef850596d1
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user