' + alertInfo.properties.event + '
';
if (alertInfo.properties.description.includes("TORNADO EMERGENCY")){
construct = construct + '
THIS IS A TORNADO EMERGENCY
';
@@ -1524,15 +1543,15 @@ function buildAlertPopup(alertInfo, lat, lng) {
if (maxwind || maxhail || fflooddamage) {
construct = construct + '
'
- if (maxwind) {construct = construct + '
' + maxwind.replace("Up to ", "") + '
';}
- if (maxhail && maxhail != "0.00") {construct = construct + '
' + maxhail + ' IN
';}
- if (fflooddamage) {construct = construct + '
' + fflooddamage + '
';}
+ if (maxwind) {construct = construct + '
' + maxwind.replace("Up to ", "") + '
';}
+ if (maxhail && maxhail != "0.00") {construct = construct + '
' + maxhail + ' IN
';}
+ if (fflooddamage) {construct = construct + '
' + fflooddamage + '
';}
construct = construct + '
'
}
if (tordetection){
construct = construct + '
'
- construct = construct + '
' + tordetection + '
';
+ construct = construct + '
' + tordetection + '
';
construct = construct + '
'
}
@@ -2340,7 +2359,7 @@ async function addWeatherRadios() {
const popupContent = `
@@ -2448,16 +2467,8 @@ setInterval(() => {
}, 30000)
-// Map radar bound circle - 150mi
-// Draw the circle
-//var circle = L.circle([yourLatitude, yourLongitude], {
-// radius: 241401,
-// stroke: 2,
-// fillOpacity: 0,
-//}).addTo(map)
-
-
-let currentLocationMarker = null;
+let outermarker = null;
+let innermarker = null;
let watchId = null;
let isLocationOn = false;
let nowlat = null;
@@ -2475,38 +2486,41 @@ function startUpdatingLocation() {
nowlon = position.coords.longitude;
// Place or update the custom circle marker at the user's location
- if (currentLocationMarker) {
- currentLocationMarker.setLatLng([nowlat, nowlon]);
+ if (outermarker) {
+ outermarker.setLatLng([nowlat, nowlon]);
+ innermarker.setLatLng([nowlat, nowlon]);
} else {
- const outermarker = L.marker([lat, lon], { icon: shadowmarker }).addTo(map);
- const innermarker = L.marker([lat, lon], { icon: currentmarker }).addTo(map);
- if (isLocationOn) {
- map.flyTo([lat, lon], 10);
- }
- document.getElementById("location").checked = true;
+ outermarker = L.marker([lat, lon], { icon: shadowmarker }).addTo(map);
+ innermarker = L.marker([lat, lon], { icon: currentmarker }).addTo(map);
+ if (isLocationOn) {
+ map.flyTo([lat, lon], 10);
+ }
+ document.getElementById("location").checked = true;
}
},
(error) => {
- switch(error.code) {
- case error.PERMISSION_DENIED:
- console.log("User denied the request for Geolocation.");
- break;
- case error.POSITION_UNAVAILABLE:
- alert("Your position is unavailable. GPS is off or signal is too weak.");
- console.log("Location information is unavailable.");
- break;
- case error.TIMEOUT:
- alert("Took too long to recieve a location, perhaps GPS is too weak.");
- console.log("The request to get user location timed out.");
- break;
- case error.UNKNOWN_ERROR:
- alert("An unknown error occurred while getting your location.");
- console.log("An unknown error occurred.");
- break;
+ if (!outermarker){
+ switch(error.code) {
+ case error.PERMISSION_DENIED:
+ console.log("User denied the request for Geolocation.");
+ break;
+ case error.POSITION_UNAVAILABLE:
+ alert("Your position is unavailable. GPS is off or signal is too weak.");
+ console.log("Location information is unavailable.");
+ break;
+ case error.TIMEOUT:
+ alert("Took too long to recieve a location, perhaps GPS is too weak.");
+ console.log("The request to get user location timed out.");
+ break;
+ case error.UNKNOWN_ERROR:
+ alert("An unknown error occurred while getting your location.");
+ console.log("An unknown error occurred.");
+ break;
+ }
+ document.getElementById("location").checked = false;
+ clearCurrentLocationMarker();
+ isLocationOn = false;
}
- document.getElementById("location").checked = false;
- clearCurrentLocationMarker();
- isLocationOn = false;
},
{
enableHighAccuracy: true,
@@ -2522,10 +2536,11 @@ function startUpdatingLocation() {
}
function clearCurrentLocationMarker() {
- if (currentLocationMarker) {
+ if (outermarker) {
map.removeLayer(outermarker);
map.removeLayer(innermarker);
- currentLocationMarker = null;
+ outermarker = null;
+ innermarker = null;
}
if (watchId !== null) {
navigator.geolocation.clearWatch(watchId);
@@ -2542,3 +2557,41 @@ function showLocation() {
clearCurrentLocationMarker();
}
}
+
+document.getElementById("location").checked = false;
+
+
+function doDictSearch(term) {
+ fetch('https://api.weather.gov/glossary')
+ .then(response => {
+ if (!response.ok) {
+ throw new Error('Network response was not ok: ' + response.statusText);
+ }
+ return response.json();
+ })
+ .then(data => {
+ var construct = "";
+ data.glossary.push({'term': 'RTS', 'definition': 'Abbreviation for return (or returned) to service.'})
+ data.glossary.forEach(function(thisterm){
+ try{
+ if (thisterm.term.toLowerCase().includes(term.toLowerCase())) {
+ construct += '
' + thisterm.term + "";
+ construct += '
' + thisterm.definition.replace("’", "'") + '
'
+ }
+ } catch {}
+ });
+
+ document.getElementById("dictres").innerHTML = construct;
+ })
+ .catch(error => {
+ console.error('doDictSearch() > fetch() > ', error);
+ });
+}
+
+document.getElementById('dictbox').addEventListener('keypress', function (e) {
+ if (e.key === 'Enter') {
+ doDictSearch(document.getElementById("dictbox").value);
+ }
+});
+
+document.getElementById("dictbox").value = "";
\ No newline at end of file
diff --git a/beta/sparkradar/style.css b/beta/sparkradar/style.css
index 7f86fcf..e589cae 100644
--- a/beta/sparkradar/style.css
+++ b/beta/sparkradar/style.css
@@ -52,9 +52,9 @@ body {
box-shadow: #0000008c 3px 3px 9px 0px;
background-color: rgba(0, 0, 0, 0.5);
color: white;
- backdrop-filter: blur(10px);
+ backdrop-filter: blur(15px);
transition-duration: 0.5s;
- -webkit-backdrop-filter: blur(10px);
+ -webkit-backdrop-filter: blur(15px);
display: none;
}
@@ -83,8 +83,8 @@ body {
height: calc(100% - 40px);
border-radius: 10px;
background-color: rgba(0, 0, 0, 0.5);
- backdrop-filter: blur(10px);
- -webkit-backdrop-filter: blur(10px);
+ backdrop-filter: blur(15px);
+ -webkit-backdrop-filter: blur(15px);
}
.nav-btn {
@@ -97,6 +97,7 @@ body {
height: fit-content;
color: white;
transition: background 0.2s !important;
+ box-shadow: rgba(0, 0, 0, 0.7) 0px 0px 10px;
}
.nav-btn:hover {
@@ -125,8 +126,8 @@ button {
.popup .leaflet-popup-content-wrapper {
transition-duration: 0.5s;
- backdrop-filter: blur(10px);
- -webkit-backdrop-filter: blur(10px);
+ backdrop-filter: blur(15px);
+ -webkit-backdrop-filter: blur(15px);
color: #fff;
font-size: medium;
font-family: "Cabin", sans-serif;
@@ -139,8 +140,8 @@ button {
}
.popup .leaflet-popup-tip {
- backdrop-filter: blur(10px);
- -webkit-backdrop-filter: blur(10px);
+ backdrop-filter: blur(15px);
+ -webkit-backdrop-filter: blur(15px);
}
.leaflet-popup-content p {
@@ -163,6 +164,7 @@ b {
border: 1px solid black;
border-radius: 50%;
transition-duration: 0.2s;
+ box-shadow: rgba(0, 0, 0, 0.7) 0px 0px 10px;
}
.radio-marker {
@@ -172,6 +174,7 @@ b {
border: 1px solid black;
border-radius: 50%;
transition-duration: 0.2s;
+ box-shadow: rgba(0, 0, 0, 0.7) 0px 0px 10px;
}
.tdwr {
@@ -295,6 +298,7 @@ input:focus::-webkit-input-placeholder {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
+ line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
}
@@ -318,6 +322,7 @@ input:focus::-webkit-input-placeholder {
border: none;
border-radius: 10px;
transition-duration: 0.2s;
+ box-shadow: rgba(0, 0, 0, 0.7) 0px 0px 10px;
}
.function-btn:hover {
@@ -548,8 +553,14 @@ input:focus::-webkit-input-placeholder {
color: black;
}
+.selected_toolbtn {
+ background: #2a7fffff !important;
+ color: white !important;
+}
+
.toolbtn:hover {
- background: #27beffff;
+ background: #27beffff !important;
+ color: black !important;
}
em {