fix: better geo-json

This commit is contained in:
hamster1963 2024-11-21 01:00:05 +08:00
parent e49a4b5b2a
commit 5eddce9624
2 changed files with 2 additions and 183 deletions

View File

@ -39,7 +39,7 @@ export async function Global({ countries = [] }: GlobalProps) {
const geoJson = JSON.parse(geoJsonString); const geoJson = JSON.parse(geoJsonString);
countries_alpha3.forEach((countryCode) => { countries_alpha3.forEach((countryCode) => {
const feature = geoJson.features.find((f: any) => f.id === countryCode); const feature = geoJson.features.find((f: any) => f.properties.iso_a3 === countryCode);
if (feature) { if (feature) {
// 获取国家的边界框 // 获取国家的边界框

File diff suppressed because one or more lines are too long