fix exception in map view
This commit is contained in:
parent
d332604f26
commit
5b1e250d57
@ -202,7 +202,7 @@ def view_map():
|
|||||||
map_size = request.args.get('map_size')
|
map_size = request.args.get('map_size')
|
||||||
user_loc = ast.literal_eval(os.popen('cat /tmp/gps_data_user_loc.txt').read())
|
user_loc = ast.literal_eval(os.popen('cat /tmp/gps_data_user_loc.txt').read())
|
||||||
last_known_list = []
|
last_known_list = []
|
||||||
#try:
|
try:
|
||||||
if track_call:
|
if track_call:
|
||||||
#folium_map = folium.Map(location=map_center, zoom_start=int(zoom_level))
|
#folium_map = folium.Map(location=map_center, zoom_start=int(zoom_level))
|
||||||
#marker_cluster = MarkerCluster().add_to(folium_map)
|
#marker_cluster = MarkerCluster().add_to(folium_map)
|
||||||
@ -295,12 +295,11 @@ def view_map():
|
|||||||
</p>
|
</p>
|
||||||
""" + map_view
|
""" + map_view
|
||||||
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))
|
||||||
#except Exception as e:
|
except Exception as e:
|
||||||
#content = """<h1 style="text-align: center;">Station not found.</h1>
|
content = """<h1 style="text-align: center;">Station not found.</h1>
|
||||||
#<p style="text-align: center;"><button onclick="self.close()">Close Window</button>
|
#<p style="text-align: center;"><button onclick="self.close()">Close Window</button>
|
||||||
#</p>"""
|
#</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:
|
if not track_call:
|
||||||
folium_map = folium.Map(location=map_center, tiles=map_theme, zoom_start=int(zoom_level))
|
folium_map = folium.Map(location=map_center, tiles=map_theme, zoom_start=int(zoom_level))
|
||||||
|
Loading…
Reference in New Issue
Block a user