add debugging information to forecast info box

This commit is contained in:
Matt Walsh
2025-08-11 22:15:16 -05:00
parent aa7ac64827
commit 190e50e2f3
4 changed files with 10 additions and 4 deletions

View File

@@ -11,4 +11,4 @@ Please do not report issues with api.weather.gov being down. It's a new service
Please include: Please include:
* Web browser and OS * Web browser and OS
* Location for which you are viewing a forecast * Forecast Information text block from the very bottom of the web page

View File

@@ -145,6 +145,8 @@ const init = async () => {
document.querySelector('#spanStationId').innerHTML = ''; document.querySelector('#spanStationId').innerHTML = '';
document.querySelector('#spanRadarId').innerHTML = ''; document.querySelector('#spanRadarId').innerHTML = '';
document.querySelector('#spanZoneId').innerHTML = ''; document.querySelector('#spanZoneId').innerHTML = '';
document.querySelector('#spanOfficeId').innerHTML = '';
document.querySelector('#spanGridPoint').innerHTML = '';
localStorage.removeItem('play'); localStorage.removeItem('play');
postMessage('navButton', 'play'); postMessage('navButton', 'play');

View File

@@ -111,7 +111,7 @@ const getWeather = async (latLon, haveDataCallback) => {
weatherParameters.stations = stations.features; weatherParameters.stations = stations.features;
// update the main process for display purposes // update the main process for display purposes
populateWeatherParameters(weatherParameters); populateWeatherParameters(weatherParameters, point.properties);
// reset the scroll // reset the scroll
postMessage({ type: 'current-weather-scroll', method: 'reload' }); postMessage({ type: 'current-weather-scroll', method: 'reload' });
@@ -753,12 +753,14 @@ const registerProgress = (_progress) => {
progress = _progress; progress = _progress;
}; };
const populateWeatherParameters = (params) => { const populateWeatherParameters = (params, point) => {
document.querySelector('#spanCity').innerHTML = `${params.city}, `; document.querySelector('#spanCity').innerHTML = `${params.city}, `;
document.querySelector('#spanState').innerHTML = params.state; document.querySelector('#spanState').innerHTML = params.state;
document.querySelector('#spanStationId').innerHTML = params.stationId; document.querySelector('#spanStationId').innerHTML = params.stationId;
document.querySelector('#spanRadarId').innerHTML = params.radarId; document.querySelector('#spanRadarId').innerHTML = params.radarId;
document.querySelector('#spanZoneId').innerHTML = params.zoneId; document.querySelector('#spanZoneId').innerHTML = params.zoneId;
document.querySelector('#spanOfficeId').innerHTML = point.cwa;
document.querySelector('#spanGridPoint').innerHTML = `${point.gridX},${point.gridY}`;
}; };
const latLonReceived = (data, haveDataCallback) => { const latLonReceived = (data, haveDataCallback) => {

View File

@@ -191,6 +191,8 @@
Station Id: <span id="spanStationId"></span><br /> Station Id: <span id="spanStationId"></span><br />
Radar Id: <span id="spanRadarId"></span><br /> Radar Id: <span id="spanRadarId"></span><br />
Zone Id: <span id="spanZoneId"></span><br /> Zone Id: <span id="spanZoneId"></span><br />
Office Id: <span id="spanOfficeId"></span><br />
Grid X,Y: <span id="spanGridPoint"></span><br />
Music: <span id="musicTrack">Not playing</span><br /> Music: <span id="musicTrack">Not playing</span><br />
Ws4kp Version: <span><%- version %></span> Ws4kp Version: <span><%- version %></span>
</div> </div>