diff --git a/README.md b/README.md
index eae486ce..4f874aed 100644
--- a/README.md
+++ b/README.md
@@ -354,3 +354,6 @@ DEVICES="/dev/ttyUSB1"
Daemon (gpsd) and 'gpsreader' is started automatically after you plug GPS in USB port.
+## Links
+
+* https://jvns.ca/blog/2024/11/29/why-pipes-get-stuck-buffering/
diff --git a/board/raspberrypi/fs_edgemap/opt/edgemap/edgeui/js/edgemap.js b/board/raspberrypi/fs_edgemap/opt/edgemap/edgeui/js/edgemap.js
index cf1d730c..35ed0366 100644
--- a/board/raspberrypi/fs_edgemap/opt/edgemap/edgeui/js/edgemap.js
+++ b/board/raspberrypi/fs_edgemap/opt/edgemap/edgeui/js/edgemap.js
@@ -137,6 +137,23 @@ class radioList {
}
+function toggleStyle() {
+ // Get the current URL
+ const url = new URL(window.location.href);
+
+ // Get the current value of the 'style' parameter
+ const currentStyle = url.searchParams.get('style');
+
+ // Determine the new value (toggle between 'bright' and 'dark')
+ const newStyle = currentStyle === 'bright' ? 'dark' : 'bright';
+
+ // Update the 'style' parameter in the URL
+ url.searchParams.set('style', newStyle);
+
+ // Reload the page with the updated URL
+ window.location.href = url.toString();
+}
+
// reticulum node list
class reticulumList {
constructor() {
diff --git a/board/raspberrypi/fs_edgemap/opt/edgemap/edgeui/js/main.js b/board/raspberrypi/fs_edgemap/opt/edgemap/edgeui/js/main.js
index 62c63649..7c318abb 100644
--- a/board/raspberrypi/fs_edgemap/opt/edgemap/edgeui/js/main.js
+++ b/board/raspberrypi/fs_edgemap/opt/edgemap/edgeui/js/main.js
@@ -132,16 +132,16 @@ var menuItems = [
title: 'About',
icon: '#svg-icon-about'
},
+ {
+ id : 'style',
+ title: 'Style',
+ icon: '#svg-icon-toggle'
+ },
{
id : 'distress',
title: 'Distress',
icon: '#svg-icon-distress'
},
- {
- id : 'wipe',
- title: 'Wipe',
- icon: '#svg-icon-wipe'
- },
{
id : 'poweroff',
title: 'Power off',
@@ -261,6 +261,12 @@ window.onload = function ()
if ( item.id == "pos_random" ) {
systemControl("pos_random");
}
+ if ( item.id == "style" ) {
+ toggleStyle();
+ }
+ if ( item.id == "distress" ) {
+ systemControl("distress");
+ }
}
diff --git a/board/raspberrypi/fs_edgemap/opt/edgemap/edgeui/map.php b/board/raspberrypi/fs_edgemap/opt/edgemap/edgeui/map.php
index b4b8b7f4..2bdffd11 100644
--- a/board/raspberrypi/fs_edgemap/opt/edgemap/edgeui/map.php
+++ b/board/raspberrypi/fs_edgemap/opt/edgemap/edgeui/map.php
@@ -399,17 +399,31 @@
[3] https://protomaps.com/
*/
-
- var map = new maplibregl.Map({
- container: 'map',
- zoom: 1,
- minZoom: 1,
- maxPitch: 85,
- hash: true,
- style: "styles/style.json"
- });
-
- const edgemapUiVersion = "v0.75";
+ // Set map style based on URL parameter
+ const url = new URL(window.location.href);
+ const style_parameter = url.searchParams.get('style');
+ if ( style_parameter == "dark" )
+ {
+ var map = new maplibregl.Map({
+ container: 'map',
+ zoom: 1,
+ minZoom: 1,
+ maxPitch: 85,
+ hash: true,
+ style: "styles/style-v4-dark.json"
+ });
+ } else {
+ var map = new maplibregl.Map({
+ container: 'map',
+ zoom: 1,
+ minZoom: 1,
+ maxPitch: 85,
+ hash: true,
+ style: "styles/style-v4.json"
+ });
+ }
+
+ const edgemapUiVersion = "v0.76";
var intialZoomLevel=1;
var symbolSize = 30;
@@ -1809,16 +1823,18 @@ function handleKeyPress(e){
-
-
-
-
+
+
+
+
diff --git a/board/raspberrypi/fs_edgemap/opt/edgemap/edgeui/styles/style-v4-dark.json b/board/raspberrypi/fs_edgemap/opt/edgemap/edgeui/styles/style-v4-dark.json
index d13c5bd5..3bccd1e6 100644
--- a/board/raspberrypi/fs_edgemap/opt/edgemap/edgeui/styles/style-v4-dark.json
+++ b/board/raspberrypi/fs_edgemap/opt/edgemap/edgeui/styles/style-v4-dark.json
@@ -10931,7 +10931,7 @@
"fill-extrusion-color": [
"interpolate",
["linear"],
- ["get", "height"], 0, "lightgray", 200, "royalblue", 400, "lightblue"
+ ["get", "height"], 0, "gray", 200, "royalblue", 400, "lightblue"
],
"fill-extrusion-height": [
"interpolate",