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:
@@ -153,3 +153,21 @@ body {
|
||||
*::-webkit-scrollbar-thumb:hover {
|
||||
background-color: rgba(0, 240, 255, 0.4);
|
||||
}
|
||||
|
||||
/* === MapLibre Dark Popup === */
|
||||
.maplibre-dark-popup .maplibregl-popup-content {
|
||||
background: var(--bg-card);
|
||||
color: var(--text-primary);
|
||||
border: 1px solid rgba(0, 240, 255, 0.15);
|
||||
border-radius: 0.75rem;
|
||||
box-shadow: 0 0 20px rgba(0, 240, 255, 0.1);
|
||||
padding: 0.75rem;
|
||||
}
|
||||
|
||||
.maplibre-dark-popup .maplibregl-popup-tip {
|
||||
border-top-color: var(--bg-card);
|
||||
}
|
||||
|
||||
.maplibre-dark-popup .maplibregl-popup-close-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user