优化日本绘图
This commit is contained in:
@@ -1190,8 +1190,8 @@
|
||||
'new york corp': [-74.0060, 40.7128],
|
||||
'san francisco': [-122.4194, 37.7749],
|
||||
'los angeles': [-118.2437, 34.0522],
|
||||
'japan': [138.2529, 36.2048],
|
||||
'jp': [138.2529, 36.2048],
|
||||
'japan': [139.6917, 35.6895],
|
||||
'jp': [139.6917, 35.6895],
|
||||
'tokyo': [139.6917, 35.6895],
|
||||
'singapore': [103.8198, 1.3521],
|
||||
'sg': [103.8198, 1.3521],
|
||||
|
||||
@@ -18,7 +18,7 @@ const enableExternalGeoLookup = process.env.ENABLE_EXTERNAL_GEO_LOOKUP === 'true
|
||||
function normalizeGeo(geo) {
|
||||
if (!geo) return geo;
|
||||
|
||||
// Custom normalization for TW to "Taipei, China" with Taipei coordinates
|
||||
// Custom normalization for TW to "Taipei, China" and JP to "Tokyo"
|
||||
const country = (geo.country || geo.country_code || '').toUpperCase();
|
||||
if (country === 'TW') {
|
||||
return {
|
||||
@@ -31,6 +31,17 @@ function normalizeGeo(geo) {
|
||||
latitude: 25.0330,
|
||||
longitude: 121.5654
|
||||
};
|
||||
} else if (country === 'JP') {
|
||||
return {
|
||||
...geo,
|
||||
city: 'Tokyo',
|
||||
country: 'JP',
|
||||
country_name: 'Japan',
|
||||
// Force Tokyo coordinates for consistent 2D plotting
|
||||
loc: '35.6895,139.6917',
|
||||
latitude: 35.6895,
|
||||
longitude: 139.6917
|
||||
};
|
||||
}
|
||||
return geo;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user