fix exception in map view

This commit is contained in:
KF7EEL 2021-03-02 12:56:24 -08:00
parent d332604f26
commit 5b1e250d57

View File

@ -202,7 +202,7 @@ def view_map():
map_size = request.args.get('map_size')
user_loc = ast.literal_eval(os.popen('cat /tmp/gps_data_user_loc.txt').read())
last_known_list = []
#try:
try:
if track_call:
#folium_map = folium.Map(location=map_center, zoom_start=int(zoom_level))
#marker_cluster = MarkerCluster().add_to(folium_map)
@ -295,12 +295,11 @@ def view_map():
</p>
""" + map_view
return render_template('generic.html', title = dashboard_title, logo = logo, content = Markup(content))
#except Exception as e:
#content = """<h1 style="text-align: center;">Station not found.</h1>
except Exception as e:
content = """<h1 style="text-align: center;">Station not found.</h1>
#<p style="text-align: center;"><button onclick="self.close()">Close Window</button>
#</p>"""
#content = str(e)
#return render_template('generic.html', title = dashboard_title, logo = logo, content = Markup(content))
return render_template('generic.html', title = dashboard_title, logo = logo, content = Markup(content))
if not track_call:
folium_map = folium.Map(location=map_center, tiles=map_theme, zoom_start=int(zoom_level))