feat: 用 react-map-gl + MapLibre 替换 react-simple-maps 实现 2D 地图
- 替换 react-simple-maps/d3-geo/topojson-client 为 react-map-gl + maplibre-gl - 使用 CARTO dark-matter 免费暗色瓦片,自带国家/城市名标注 - 基于 locale 动态切换地图标注语言(name:zh / name_en) - MapLibre 原生 heatmap + circle 双层渲染替代 SVG 热力图 - 提取 MapPopup 组件,配合 react-map-gl Popup 实现点击弹窗 - continent page 改为 dynamic import (ssr: false) - dev 模式去掉 Turbopack 以兼容 maplibre-gl - 删除 heatmap-layer.tsx 和 react-simple-maps 类型声明
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev --turbopack",
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint",
|
||||
@@ -15,11 +15,11 @@
|
||||
"dependencies": {
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"d3-geo": "^3.1.1",
|
||||
"drizzle-orm": "^0.41.0",
|
||||
"framer-motion": "^12.6.0",
|
||||
"ioredis": "^5.6.1",
|
||||
"lucide-react": "^0.474.0",
|
||||
"maplibre-gl": "^5.20.0",
|
||||
"mysql2": "^3.14.0",
|
||||
"nanoid": "^5.1.5",
|
||||
"next": "^15.3.0",
|
||||
@@ -27,22 +27,19 @@
|
||||
"react": "^19.1.0",
|
||||
"react-dom": "^19.1.0",
|
||||
"react-globe.gl": "^2.27.3",
|
||||
"react-simple-maps": "^3.0.0",
|
||||
"react-map-gl": "^8.1.0",
|
||||
"recharts": "^2.15.3",
|
||||
"tailwind-merge": "^3.0.2",
|
||||
"three": "^0.173.0",
|
||||
"topojson-client": "^3.1.0",
|
||||
"zod": "^3.24.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3.3.1",
|
||||
"@tailwindcss/postcss": "^4.1.0",
|
||||
"@types/d3-geo": "^3.1.0",
|
||||
"@types/node": "^22.13.0",
|
||||
"@types/react": "^19.0.0",
|
||||
"@types/react-dom": "^19.0.0",
|
||||
"@types/three": "^0.173.0",
|
||||
"@types/topojson-client": "^3.1.5",
|
||||
"drizzle-kit": "^0.30.6",
|
||||
"eslint": "^9.21.0",
|
||||
"eslint-config-next": "^15.3.0",
|
||||
|
||||
Reference in New Issue
Block a user