From bbeaa8a3761ed6cf25b7cf53d5f0ba54c226bca1 Mon Sep 17 00:00:00 2001 From: Matthias Wirth Date: Wed, 2 Jun 2021 20:34:34 +0200 Subject: [PATCH] fix SiteLat people --- html/script.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/html/script.js b/html/script.js index 81655bb..c81eb2b 100644 --- a/html/script.js +++ b/html/script.js @@ -2125,11 +2125,7 @@ function initMap() { } }, true); - if (globeIndex || uuid || askLocation) - geoFindMe(); - else { - initSitePos(); - } + geoFindMe(); } // This looks for planes to reap out of the master Planes variable @@ -5214,6 +5210,10 @@ function logArg(error) { } function geoFindMe() { + if (SiteOverride || (!globeIndex && !uuid && !askLocation)) { + initSitePos(); + return; + } function success(position) { SiteLat = DefaultCenterLat = position.coords.latitude; @@ -5253,9 +5253,7 @@ function geoFindMe() { initSitePos(); } - if (SiteOverride) { - // do nothing - } else if (!navigator.geolocation) { + if (!navigator.geolocation) { console.log('Geolocation is not supported by your browser'); } else { // change SitePos on location change