portrait regional forecast #167

This commit is contained in:
Matt Walsh
2026-04-20 15:13:23 -05:00
parent 0f1c12bf67
commit 38d5132281
2 changed files with 14 additions and 6 deletions

View File

@@ -209,14 +209,14 @@ const getMinMaxLatitudeLongitudeHI = (X, Y, OffsetX, OffsetY) => {
};
};
const getXYForCity = (City, MaxLatitude, MinLongitude, state, maxX = 580) => {
const getXYForCity = (City, MaxLatitude, MinLongitude, state, maxX = 580, maxY = 282) => {
if (state === 'AK') getXYForCityAK(City, MaxLatitude, MinLongitude);
if (state === 'HI') getXYForCityHI(City, MaxLatitude, MinLongitude);
let x = (City.lon - MinLongitude) * 57;
let y = (MaxLatitude - City.lat) * 70;
if (y < 30) y = 30;
if (y > 282) y = 282;
if (y > maxY) y = maxY;
if (x < 40) x = 40;
if (x > maxX) x = maxX;