From f42e987f41a77abcb4f1dca5de54e8f23ba4e873 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Fri, 5 Mar 2021 10:00:08 +0100 Subject: [PATCH] make mapOrientation a query parameter --- html/script.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/html/script.js b/html/script.js index d306a43..9bb6646 100644 --- a/html/script.js +++ b/html/script.js @@ -627,6 +627,11 @@ function initPage() { filterMaxRange *= 1852; // convert from nmi to meters + if (usp.has('mapOrientation')) { + mapOrientation = parseFloat(usp.get('mapOrientation')); + } + mapOrientation *= (Math.PI/180); // adjust to radians + if (usp.has('r')) { let numbers = (usp.get('r') || "").split('-'); let ts = new Date(); @@ -661,8 +666,6 @@ function initPage() { setInterval(globeRateUpdate(), 300000); } - mapOrientation *= (Math.PI/180); // adjust to radians - if (localStorage['enableLabels'] == 'true'){ toggleLabels(); }