This commit is contained in:
eric
2026-03-09 05:07:59 -05:00
parent 302a072036
commit eb852fb11d
27 changed files with 1523 additions and 169 deletions

View File

@@ -0,0 +1,20 @@
import { NextResponse } from "next/server";
/**
* 代理中国地图 GeoJSON避免前端 CORS
*/
export async function GET() {
try {
const res = await fetch(
"https://geo.datav.aliyun.com/areas_v3/bound/100000_full.json"
);
const data = await res.json();
return NextResponse.json(data);
} catch (e) {
console.error("Failed to fetch china map:", e);
return NextResponse.json(
{ error: "Failed to load map" },
{ status: 500 }
);
}
}