diff --git a/bridge_gps_data.py b/bridge_gps_data.py index 62117ea..3190da8 100755 --- a/bridge_gps_data.py +++ b/bridge_gps_data.py @@ -167,7 +167,7 @@ def dashboard_loc_write(call, lat, lon, time): # dash_entries = [] dash_entries.insert(0, {'call': call, 'lat': lat, 'lon': lon, 'time':time}) with open("/tmp/gps_data_user_loc.txt", 'w') as user_loc_file: - user_loc_file.write(str(dash_entries[:50])) + user_loc_file.write(str(dash_entries[:200])) user_loc_file.close() logger.info('User location saved for dashboard') #logger.info(dash_entries) diff --git a/gps_data.py b/gps_data.py index 01d75a7..a1cb8ca 100644 --- a/gps_data.py +++ b/gps_data.py @@ -160,7 +160,7 @@ def dashboard_loc_write(call, lat, lon, time): # dash_entries = [] dash_entries.insert(0, {'call': call, 'lat': lat, 'lon': lon, 'time':time}) with open("/tmp/gps_data_user_loc.txt", 'w') as user_loc_file: - user_loc_file.write(str(dash_entries[:50])) + user_loc_file.write(str(dash_entries[:200])) user_loc_file.close() logger.info('User location saved for dashboard') #logger.info(dash_entries) diff --git a/scripts/dashboard/dashboard.py b/scripts/dashboard/dashboard.py index 30dd1e0..211bb01 100644 --- a/scripts/dashboard/dashboard.py +++ b/scripts/dashboard/dashboard.py @@ -196,7 +196,7 @@ def view_map(): if 'W' in user_coord['lon']: user_lon = -user_lon if user_coord['call'] not in last_known_list and user_coord['call'] == track_call: - folium_map = folium.Map(location=[user_lat, user_lon], tiles="Stamen Toner", zoom_start=15) + folium_map = folium.Map(location=[user_lat, user_lon], tiles=map_theme, zoom_start=15) marker_cluster = MarkerCluster().add_to(folium_map) folium.Marker([user_lat, user_lon], popup=""" @@ -251,7 +251,7 @@ def view_map():

""" if not track_call: - folium_map = folium.Map(location=map_center, tiles="Stamen Toner", zoom_start=int(zoom_level)) + folium_map = folium.Map(location=map_center, tiles=map_theme, zoom_start=int(zoom_level)) marker_cluster = MarkerCluster().add_to(folium_map) for user_coord in user_loc: user_lat = aprs_to_latlon(float(re.sub('[A-Za-z]','', user_coord['lat']))) diff --git a/scripts/dashboard/dashboard_settings-SAMPLE.py b/scripts/dashboard/dashboard_settings-SAMPLE.py index 0ffd25b..9b8811e 100644 --- a/scripts/dashboard/dashboard_settings-SAMPLE.py +++ b/scripts/dashboard/dashboard_settings-SAMPLE.py @@ -51,6 +51,9 @@ contact_website = 'https://hbl.ink' # Center dashboard map over these coordinates map_center = (47.00, -120.00) zoom_level = 7 +# List and preview of some map themes at http://leaflet-extras.github.io/leaflet-providers/preview/ +# The following are options for map themes and just work, you should use one of these: “OpenStreetMap”, “Stamen” (Terrain, Toner, and Watercolor), +map_theme = 'Stamen Toner' # RSS feed link, shows in the link section of each RSS item. rss_link = 'http://localhost:8092'