mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
fix(global): remove dev map code
This commit is contained in:
parent
b8d6e83169
commit
e5e2d2b02d
@ -1,37 +0,0 @@
|
|||||||
import { devGeoString } from "@/lib/dev-geo";
|
|
||||||
import DottedMap, { getMapJSON } from "dotted-map";
|
|
||||||
|
|
||||||
export default function GlobalGen() {
|
|
||||||
const devGeoJson = JSON.parse(devGeoString);
|
|
||||||
const geoList = devGeoJson.features
|
|
||||||
.filter((x: any) => x.id !== "ATA") // 添加这一行来过滤掉南极洲
|
|
||||||
.map((x: any) => {
|
|
||||||
return x.id;
|
|
||||||
});
|
|
||||||
console.log(geoList);
|
|
||||||
|
|
||||||
const mapString = getMapJSON({
|
|
||||||
height: 150,
|
|
||||||
countries: geoList, // look into `countries.geo.json` to see which keys to use. You can also omit this parameter and the whole world will be used
|
|
||||||
grid: "diagonal", // how points should be aligned
|
|
||||||
});
|
|
||||||
|
|
||||||
// const finalMap = map.getSVG({
|
|
||||||
// radius: 0.35,
|
|
||||||
// color: "#D1D5DA",
|
|
||||||
// shape: "circle",
|
|
||||||
// });
|
|
||||||
|
|
||||||
// const mapJsonString = getMapJSON({ height: 60, grid: 'diagonal' });
|
|
||||||
console.log(mapString);
|
|
||||||
|
|
||||||
return (
|
|
||||||
// <section className="flex flex-col gap-4 mt-[3.2px]">
|
|
||||||
// <img
|
|
||||||
// src={`data:image/svg+xml;utf8,${encodeURIComponent(finalMap)}`}
|
|
||||||
// alt="World Map with Highlighted Countries"
|
|
||||||
// />
|
|
||||||
// </section>
|
|
||||||
null
|
|
||||||
);
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user