diff --git a/cmd/server/routes.go b/cmd/server/routes.go index 95586c1b..6e30605b 100644 --- a/cmd/server/routes.go +++ b/cmd/server/routes.go @@ -2909,6 +2909,8 @@ var iataCoords = map[string]IataCoord{ "LAX": {Lat: 33.9425, Lon: -118.4081}, "SAN": {Lat: 32.7338, Lon: -117.1933}, "SMF": {Lat: 38.6954, Lon: -121.5908}, + "APC": {Lat: 38.2132, Lon: -122.2807}, // Napa County + "STS": {Lat: 38.509, Lon: -122.8128}, // Charles M. Schulz–Sonoma County "MRY": {Lat: 36.587, Lon: -121.843}, "EUG": {Lat: 44.1246, Lon: -123.2119}, "RDD": {Lat: 40.509, Lon: -122.2934}, diff --git a/cmd/server/routes_test.go b/cmd/server/routes_test.go index 3f33b244..3765ae0f 100644 --- a/cmd/server/routes_test.go +++ b/cmd/server/routes_test.go @@ -1874,6 +1874,29 @@ func TestConfigRegionsWithCustomRegions(t *testing.T) { } } +func TestIataCoordsIncludesNapaAndSonoma(t *testing.T) { + // Issue #1786: observers tagged APC (Napa County) or STS (Charles M. + // Schulz–Sonoma County) rendered without lat/lon and did not pin on the map + // because iataCoords lacked entries for them. + cases := []struct { + code string + lat, lon float64 + }{ + {"APC", 38.2132, -122.2807}, + {"STS", 38.509, -122.8128}, + } + for _, c := range cases { + coord, ok := iataCoords[c.code] + if !ok { + t.Errorf("iataCoords missing %q", c.code) + continue + } + if coord.Lat != c.lat || coord.Lon != c.lon { + t.Errorf("%s = {%v, %v}, want {%v, %v}", c.code, coord.Lat, coord.Lon, c.lat, c.lon) + } + } +} + func TestConfigMapWithCustomDefaults(t *testing.T) { db := setupTestDB(t) seedTestData(t, db)