Compare commits

...

3 Commits

Author SHA1 Message Date
xaloc 04a3b8cb82 disable cache 2024-10-14 16:50:41 +02:00
xaloc 72b9c4672b remove window.onload 2023-02-27 14:09:01 +01:00
xaloc ff5942cba1 add temperature map and fix typo 2023-02-14 14:22:19 +01:00
+10 -3
View File
@@ -6,6 +6,7 @@
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="author" content="Arnau Busom i Vidal"> <meta name="author" content="Arnau Busom i Vidal">
<meta name="viewport" content="width=device-width, initial-scale=1"/> <meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta http-equiv="Cache-Control" content="no-cache">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" <link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A==" integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
crossorigin=""/> crossorigin=""/>
@@ -38,9 +39,13 @@
</div> </div>
</div> </div>
<div style="text-align: center;"> <div style="text-align: center;">
<h1 id='clouds'>Cloud Coverage Forcast for the next hour</h1> <h1 id='clouds'>Cloud Coverage Forecast for the next hour</h1>
<div id="mapid", style="height: 400px; width: 70%; margin: auto;"></div> <div id="mapid", style="height: 400px; width: 70%; margin: auto;"></div>
</div> </div>
<div style="text-align: center;">
<h1 id='temp'>Current temperature map (in °C)</h1>
<embed src="https://www.temperatur.nu/karta2.php#67.86313,20.20935,8z", id="tempmapid", style="height: 400px; width: 70%; margin: auto;">
</div>
<div style="text-align: center;"> <div style="text-align: center;">
<h1>Aurora Forecast</h1> <h1>Aurora Forecast</h1>
<div style="display: inline-block; padding: 10px;"> <div style="display: inline-block; padding: 10px;">
@@ -82,7 +87,8 @@
document.getElementById('kp_3').textContent = Number(kp_3.toFixed(2)); document.getElementById('kp_3').textContent = Number(kp_3.toFixed(2));
} }
window.onload = api; //window.onload = api;
api();
var mymap = L.map('mapid').setView([67.8488, 20.3027], 6); var mymap = L.map('mapid').setView([67.8488, 20.3027], 6);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
@@ -108,7 +114,8 @@
addClouds(data.geometry.coordinates[i][1],data.geometry.coordinates[i][0],data.timeSeries[0].parameters[0].values[i]) addClouds(data.geometry.coordinates[i][1],data.geometry.coordinates[i][0],data.timeSeries[0].parameters[0].values[i])
} }
} }
window.onload = clouds; //window.onload = clouds;
clouds();
function addClouds(lat,lon,opa){ function addClouds(lat,lon,opa){
var circle = L.circle([lat, lon], { var circle = L.circle([lat, lon], {