From 20918bc7145699cb287f790cf0a9bfd4da917f5b Mon Sep 17 00:00:00 2001 From: Andreas Kristiansen <6977712+AndreasK79@users.noreply.github.com> Date: Sat, 16 Mar 2024 15:48:12 +0100 Subject: [PATCH] Updated path for js and image --- application/controllers/Map.php | 1 + application/views/globe/index.php | 3 +-- assets/js/sections/globe.js | 26 +++++++++++++------------- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/application/controllers/Map.php b/application/controllers/Map.php index 5eed95425..158f7bece 100644 --- a/application/controllers/Map.php +++ b/application/controllers/Map.php @@ -29,6 +29,7 @@ class Map extends CI_Controller { public function glob_plot() { $footerData = []; $footerData['scripts'] = [ + 'assets/js/globe/globe.gl.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/globe/globe.gl.js")), 'assets/js/sections/globe.js?' . filemtime(realpath(__DIR__ . "/../../assets/js/sections/globe.js")), ]; $this->load->view('interface_assets/header'); diff --git a/application/views/globe/index.php b/application/views/globe/index.php index d09225241..39aadb1a9 100644 --- a/application/views/globe/index.php +++ b/application/views/globe/index.php @@ -1,2 +1 @@ - -
+ diff --git a/assets/js/sections/globe.js b/assets/js/sections/globe.js index 2dd08eacf..7b6ee5e11 100644 --- a/assets/js/sections/globe.js +++ b/assets/js/sections/globe.js @@ -7,10 +7,10 @@ $(document).ready(function() { globePayLab=[]; x.forEach((element) => { let OneQsoArc={}; - OneQsoArc.startLat=element.latlng1[0]; - OneQsoArc.startLng=element.latlng1[1]; - OneQsoArc.endLat=element.latlng2[0]; - OneQsoArc.endLng=element.latlng2[1]; + OneQsoArc.startLat=element.latlng1[0]; + OneQsoArc.startLng=element.latlng1[1]; + OneQsoArc.endLat=element.latlng2[0]; + OneQsoArc.endLng=element.latlng2[1]; OneQsoArc.name=element.callsign; if (element.confirmed) { OneQsoArc.color = 'green'; @@ -19,7 +19,7 @@ $(document).ready(function() { } // OneQsoArc.color = [['red', 'white', 'blue', 'green'][Math.round(Math.random() * 3)], ['red', 'white', 'blue', 'green'][Math.round(Math.random() * 3)]] OneQsoArc.altitude=0.15; - globePayArc.push(OneQsoArc); + globePayArc.push(OneQsoArc); let OneQsoLab={}; OneQsoLab.lat=element.latlng2[0]; OneQsoLab.lng=element.latlng2[1]; @@ -35,20 +35,20 @@ $(document).ready(function() { fdata.append('qsoresults','100'); const response = await fetch(base_url + 'logbookadvanced/mapQsos', { - method: "POST", - mode: "cors", - cache: "no-cache", - credentials: "same-origin", - redirect: "follow", - referrerPolicy: "no-referrer", + method: "POST", + mode: "cors", + cache: "no-cache", + credentials: "same-origin", + redirect: "follow", + referrerPolicy: "no-referrer", body: fdata, }); - return response.json(); + return response.json(); } function renderGlobe(arcsData,labelData) { Globe() - .globeImageUrl('/assets/images/earth-blue-marble.jpg') + .globeImageUrl(base_url + '/assets/images/earth-blue-marble.jpg') .labelsData(labelData) .arcsData(arcsData) .arcColor('color')