From 748391ef32608290fd7b938e5ff4595dc55e86b3 Mon Sep 17 00:00:00 2001 From: Daniel Frett Date: Mon, 25 Mar 2024 09:36:25 -0600 Subject: [PATCH 1/3] Update GeoURI to drop a pin when opened with Google Maps Wikipedia lists an unofficial extension using the `q` parameter to have Google Maps show a pin from a GeoURI. See: https://en.wikipedia.org/wiki/Geo_URI_scheme#Unofficial_extensions I tested this on Android Google Maps and opening the link directly through the Tesla app. I also tested the url pattern: `geo:0,0?q={x},{y}`, but opted to go with the committed pattern to account for external maps that may not recognize the `q` parameter --- server/src/configs/default.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/configs/default.json b/server/src/configs/default.json index f77f8b29c..06f5d594c 100644 --- a/server/src/configs/default.json +++ b/server/src/configs/default.json @@ -907,7 +907,7 @@ }, { "name": "GeoURI", - "url": "geo:{x},{y}" + "url": "geo:{x},{y}?q={x},{y}" } ], "icons": { @@ -1022,4 +1022,4 @@ "tracesSampleRate": 0.1 } } -} \ No newline at end of file +} From 6b2829e5ce959d4d52a0dd3672dac4bdac40047c Mon Sep 17 00:00:00 2001 From: Daniel Frett Date: Mon, 25 Mar 2024 09:43:53 -0600 Subject: [PATCH 2/3] Switch replace to replaceAll for generating navigation buttons --- src/components/popups/Navigation.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/popups/Navigation.jsx b/src/components/popups/Navigation.jsx index cd4605a8a..1d7e67cba 100644 --- a/src/components/popups/Navigation.jsx +++ b/src/components/popups/Navigation.jsx @@ -15,7 +15,7 @@ export function Navigation({ lat, lon, size = 'large' }) { const url = useMemory((s) => s.settings.navigation[nav]?.url) return ( Date: Mon, 25 Mar 2024 09:56:20 -0600 Subject: [PATCH 3/3] style: run prettier --write --- src/components/popups/Navigation.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/popups/Navigation.jsx b/src/components/popups/Navigation.jsx index 1d7e67cba..c2d42128a 100644 --- a/src/components/popups/Navigation.jsx +++ b/src/components/popups/Navigation.jsx @@ -15,7 +15,9 @@ export function Navigation({ lat, lon, size = 'large' }) { const url = useMemory((s) => s.settings.navigation[nav]?.url) return (