diff --git a/index.html b/index.html index 48be97ff..8211b31e 100644 --- a/index.html +++ b/index.html @@ -5736,12 +5736,13 @@

Latitude:

Longitude:

+

Geozone:

Area: 0

Type: n/a

Precipitation: 0

River: no

Population: 0

-

Elevation: 0

+

Elevation: 0

Depth: 0

Temperature: 0

Biome: n/a

@@ -8038,7 +8039,7 @@ - + @@ -8080,7 +8081,7 @@ - + diff --git a/modules/ui/general.js b/modules/ui/general.js index 3530a442..9e62ef9a 100644 --- a/modules/ui/general.js +++ b/modules/ui/general.js @@ -259,10 +259,11 @@ function updateCellInfo(point, i, g) { const f = cells.f[i]; infoLat.innerHTML = toDMS(getLatitude(y, 4), "lat"); infoLon.innerHTML = toDMS(getLongitude(x, 4), "lon"); + infoGeozone.innerHTML = getGeozone(getLatitude(y, 4)); infoCell.innerHTML = i; infoArea.innerHTML = cells.area[i] ? si(getArea(cells.area[i])) + " " + getAreaUnit() : "n/a"; - infoEvelation.innerHTML = getElevation(pack.features[f], pack.cells.h[i]); + infoElevation.innerHTML = getElevation(pack.features[f], pack.cells.h[i]); infoDepth.innerHTML = getDepth(pack.features[f], point); infoTemp.innerHTML = convertTemperature(grid.cells.temp[g]); infoPrec.innerHTML = cells.h[i] >= 20 ? getFriendlyPrecipitation(i) : "n/a"; @@ -286,6 +287,19 @@ function updateCellInfo(point, i, g) { infoBiome.innerHTML = biomesData.name[cells.biome[i]]; } +function getGeozone(latitude) { + + if (latitude > 66.5) return "Arctic"; + if (latitude > 35) return "Temperate North"; + if (latitude > 23.5) return "Subtropical North"; + if (latitude > 1) return "Tropical North"; + if (latitude > -1) return "Equatorial"; + if (latitude > -23.5) return "Tropical South"; + if (latitude > -35) return "Subtropical South"; + if (latitude > -66.5) return "Temperate South"; + return "Antarctic"; +} + // convert coordinate to DMS format function toDMS(coord, c) { const degrees = Math.floor(Math.abs(coord)); diff --git a/versioning.js b/versioning.js index 93bbb8e4..283c243e 100644 --- a/versioning.js +++ b/versioning.js @@ -12,7 +12,7 @@ * * Example: 1.102.0 -> Major version 1, Minor version 102, Patch version 0 */ -const VERSION = "1.102.0"; +const VERSION = "1.103.0"; { document.title += " v" + VERSION;