Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
6b6a8a6
chore: bump version to 0.3.4
lzxue Jul 9, 2026
a7e82f8
fix: 添加@types/geojson依赖 & 清理ImageCalibrationControl冗余判断
lzxue Jul 10, 2026
c93b621
chore: 更新依赖锁文件及plot包配置
lzxue Jul 10, 2026
0e6452e
chore: bump version to 0.3.5
lzxue Jul 10, 2026
db7b48d
feat: 新增台风路径地图 Demo & 修复站点 Demo 类型错误
lzxue Jul 10, 2026
46d43f2
fix: 台风预报路径改用实线渲染,修复虚线像素级退化成点串
lzxue Jul 10, 2026
fb75e53
feat: 台风预报改虚线/历史轨迹实线去动画 + 点击线路显示 Popup
lzxue Jul 10, 2026
5c36d88
feat: TyphoonMap 新增降雨/云图/雷达/风场/卫星图层切换(浙江水利气象 API)
lzxue Jul 10, 2026
4c55078
feat: 增强地图组件能力与新增 map-app-builder skill
lzxue Jul 11, 2026
31fcd4e
chore: 添加临时资源文件
lzxue Jul 11, 2026
8107920
chore: 移除临时资源文件
lzxue Jul 11, 2026
dd77c74
fix(RouteLayer): 修复 rest 未定义错误、NaN 坐标校验及优化标注布局
lzxue Jul 11, 2026
996a155
feat: 台风地图移动端适配 + BlockPage设备切换 + skill重组
lzxue Jul 11, 2026
979b69d
fix(RouteLayer): 修复文字与图标/圆点重叠问题,优化默认参数
lzxue Jul 11, 2026
a821124
fix: 修复 GoogleMapsMobileDemo 地图无法交互的问题
lzxue Jul 11, 2026
a3ce1f6
chore: 提交所有待提交更改
lzxue Jul 11, 2026
623e96e
feat: 添加 Canvas 风场图层及 PC 端 UI 布局优化
lzxue Jul 12, 2026
72e0db8
refactor(RouteLayer): 移除发光与流动动画能力
lzxue Jul 13, 2026
3421cc7
feat(demos): 优化 AppleMaps/GoogleMaps 演示与台风默认图层
lzxue Jul 13, 2026
6271a5b
docs: 走查修复文档与 skill 同步至 0.4.1
lzxue Jul 13, 2026
66a1323
chore: bump version to 0.4.2
lzxue Jul 13, 2026
9419546
fix: 添加缺失的 @tailwindcss/postcss 依赖
lzxue Jul 13, 2026
2c1ff9f
fix(SchemaLayer): 修复 sortValue 循环引用导致栈溢出 + 双击上卷事件
lzxue Jul 14, 2026
ee7a368
chore: bump version to 0.4.3
lzxue Jul 14, 2026
4540a3f
fix(core): 统一 L7 2.29.1 与 l7-maps 清理,补全 scene/layer 使用约束
lzxue Jul 18, 2026
4906fc7
fix(vercel): pin installCommand to internal registry for debug@4.4.3 …
lzxue Jul 18, 2026
8e3e256
fix: refresh debug@4.4.3 lockfile checksum
Copilot Jul 18, 2026
24e090f
fix(deps+vercel): align lockfile and Vercel install on public npm reg…
lzxue Jul 18, 2026
d5bd83c
fix(site): alias @antv/aimapui-plot to source for CI build
lzxue Jul 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,6 @@ dist-site/

.codefuse/

.codefuseone/
.codefuseone/
# pnpm 本地 store(不应入库)
.pnpm-store/
86 changes: 86 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,91 @@
# Changelog

## 0.4.4 (2026-07-15)

### Bug Fixes

- **MapScene:** 底图引擎改从 `@antv/l7` 统一导入,避免把 `@antv/l7-maps` 各引擎适配层(mapbox-gl / maplibre-gl / AMap Loader 等)及 GLSL 着色器打包进产物
- **cli:** `aimapui --version` 改为从 `package.json` 动态读取,修复版本号长期显示 `0.1.0` 的问题

### Documentation

- aimapui skill 版本说明同步至 0.4.4

## 0.4.3 (2026-07-14)

### Bug Fixes

- **SchemaLayer:** 修复 `sortValue` 递归遍历对象时遇到循环引用导致 `Maximum call stack size exceeded` 的问题,通过 `WeakSet` 检测已访问对象

### Features

- **ChinaDistrict:** 下钻模式支持双击上卷(dblclick 触发 drillUp)
- **SchemaLayer/PolygonLayer:** 新增 `onDblclick`/`onUndblclick` 事件,与 click 互斥

## 0.4.2 (2026-07-13)

### Documentation

- 走查修复文档与 skill 同步:补充 H3Layer、RouteLayer、AnnotationControl、ResetViewControl、LogoControl、LegendControl、SatelliteLayerControl 站点文档
- 删除 RouteLayer 已废弃属性文档(glow/animate/animateSpeed)
- controls.md skill reference 补齐所有控件
- CHANGELOG.md 补录 0.3.2~0.4.1 变更记录
- SKILL.md 补充 @antv/aimapui-plot 包说明
- CLI 版本对齐至 0.4.2

## 0.4.1 (2026-07-13)

### Features

- **台风地图:** 新增台风路径地图 Demo,支持降雨/云图/雷达/风场/卫星图层切换(浙江水利气象 API)
- **台风预报:** 台风预报路径改用实线渲染,修复虚线像素级退化成点串问题;历史轨迹使用实线
- **台风地图移动端:** 台风地图移动端适配 + BlockPage 设备切换
- **map-app-builder skill:** 新增 map-app-builder skill,覆盖布局架构、图层层级、DOM z-index、主题系统等
- **Canvas 风场图层:** 添加 Canvas 风场图层及 PC 端 UI 布局优化
- **Apple/Google Maps 演示:** 优化 AppleMaps/GoogleMaps 演示与台风默认图层

### Breaking Changes

- **RouteLayer:** 移除 `glow`、`animate`、`animateSpeed` 属性,发光与流动动画能力不再支持

### Bug Fixes

- **RouteLayer:** 修复文字与图标/圆点重叠问题,优化默认参数(`lineWidth` 3→4,`stopSize` 14→8)
- **RouteLayer:** 修复 `rest` 未定义错误、NaN 坐标校验及优化标注布局
- **GoogleMaps:** 修复 GoogleMapsMobileDemo 地图无法交互的问题

## 0.3.5 (2026-06-20)

### Bug Fixes

- **ImageCalibrationControl:** 清理冗余判断逻辑
- 添加 `@types/geojson` 依赖
- 更新依赖锁文件及 plot 包配置

## 0.3.4 (2026-06-19)

### Features

- **SatelliteLayerControl:** 新增卫星影像图层控件,支持提供商切换(高德/天地图/Google)、可见性开关、透明度调节
- 补齐复合图层设计规范

### Bug Fixes

- **ImageCalibrationControl:** 修复多图切换时图层消失的问题

## 0.3.3 (2026-06-19)

### Refactoring

- 地图引擎从动态 `import` 改为静态 `import`,避免 chunk 加载失败

## 0.3.2 (2026-06-19)

### Bug Fixes

- **ChinaDistrict:** 修复中国行政区划直辖市下钻时 adcode 前缀匹配不生效的问题
- 标注 L7 版本要求 ≥ 2.28.14

## 0.3.1 (2026-06-18)

### Features
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/aimapui-cli",
"version": "0.3.3",
"version": "0.4.4",
"type": "module",
"description": "CLI for adding @antv/aimapui components to your project (shadcn/ui style)",
"bin": {
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/registry.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"name": "@antv/aimapui",
"baseUrl": "https://raw.githubusercontent.com/antvis/aimapui/main",
"peerDependencies": {
"@antv/l7": "^2.28.0",
"@antv/l7-maps": "^2.28.0",
"@antv/l7": "^2.29.1",
"react": ">=18.0.0",
"react-dom": ">=18.0.0"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env node

import { Command } from 'commander';
import packageJson from '../package.json' with { type: 'json' };
import { init } from './commands/init.js';
import { add } from './commands/add.js';
import { list } from './commands/list.js';
Expand All @@ -10,7 +11,7 @@ const program = new Command();
program
.name('aimapui')
.description('CLI for adding @antv/aimapui components to your project')
.version('0.1.0');
.version(packageJson.version);

program
.command('init')
Expand Down
7 changes: 4 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/aimapui",
"version": "0.3.3",
"version": "0.4.4",
"type": "module",
"description": "Schema/DSL-driven React map visualization component library powered by L7",
"main": "dist/index.cjs",
Expand Down Expand Up @@ -36,8 +36,7 @@
"prepublishOnly": "npm run build"
},
"dependencies": {
"@antv/l7": "2.28.14",
"@antv/l7-maps": "2.28.14",
"@antv/l7": "2.29.1",
"ahooks": "^3.8.4",
"clsx": "^2.1.1",
"geotiff": "^3.0.5",
Expand All @@ -49,7 +48,9 @@
"react-dom": ">=18.0.0"
},
"devDependencies": {
"@tailwindcss/postcss": "^4.3.2",
"@tailwindcss/vite": "^4.0.0",
"@types/geojson": "^7946.0.16",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/supercluster": "^7.1.3",
Expand Down
5 changes: 5 additions & 0 deletions packages/core/postcss.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export default {
plugins: {
'@tailwindcss/postcss': {},
},
};
4 changes: 2 additions & 2 deletions packages/core/src/components/CompositeLayer/ArcFlowLayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ export function ArcFlowLayer({
nodeSize = 4,
nodeSizeRange,
nodePulse = false,
showTooltip = true,
showNodePopup = true,
showTooltip = false,
showNodePopup = false,
activeColor = '#FFD93D',
onArcHover,
onArcClick,
Expand Down
28 changes: 19 additions & 9 deletions packages/core/src/components/CompositeLayer/BubbleLayer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useState, useEffect } from 'react';
import type { ActiveConfig, LayerSchema, SelectConfig, LayerEventPayload } from '../../schema/types';
import { PointLayer } from '../Layer/PointLayer';
import { getColorPalette, type ColorScheme } from '../../constants/colorPalettes';

export const BUBBLE_SIZE_LEVELS = [8, 16, 32, 48, 64] as const;

Expand Down Expand Up @@ -36,6 +37,8 @@ export interface BubbleLayerProps extends Omit<LayerSchema, 'type' | 'source' |
labelOffset?: [number, number];
/** sizeField 为离散值时,对应每个 sizeValues 的域值顺序(默认 1..N) */
sizeDomain?: Array<string | number>;
/** 连续数值尺寸范围 [min, max],与 sizeField 配合使用。提供时自动线性映射 */
sizeRange?: [number, number];
/** 气泡锚点,决定标签相对气泡的连接参考点 */
bubbleAnchor?: BubbleAnchor;
/** 文本锚点,映射到 textAnchor */
Expand All @@ -55,6 +58,9 @@ export interface BubbleLayerProps extends Omit<LayerSchema, 'type' | 'source' |
/** 语义色板映射字段,例如 status: primary|warning|error|success */
semanticColorField?: string;

/** 色板预设,默认 'categorical'。当无 semanticColorField 且无 colorValues 时使用 */
colorScheme?: ColorScheme;

// ===== 事件回调 =====
/** 点击事件 */
onClick?: (payload: LayerEventPayload) => void;
Expand Down Expand Up @@ -88,14 +94,16 @@ export function BubbleLayer({
showLabel = true,
labelOffset,
sizeDomain,
sizeRange,
bubbleAnchor = 'bottom',
labelAnchor = 'top',
hoverEffect = true,
clickEffect = true,
tooltipEffect = true,
hoverEffect = false,
clickEffect = false,
tooltipEffect = false,
tooltipFields,
tooltipTemplate,
semanticColorField,
colorScheme = 'categorical',
color = '#2563eb',
size = 16,
sizeField,
Expand All @@ -119,14 +127,16 @@ export function BubbleLayer({
BUBBLE_QUALITATIVE_COLORS.error,
BUBBLE_QUALITATIVE_COLORS.success,
]
: undefined);
: mappedColorField
? [...getColorPalette(colorScheme)]
: undefined);

const mappedSizeValues = sizeField
? (sizeValues ?? [...BUBBLE_SIZE_LEVELS])
? (sizeValues ?? (sizeRange ? undefined : [...BUBBLE_SIZE_LEVELS]))
: sizeValues;

const defaultActive: ActiveConfig = { color: '#60a5fa' };
const defaultSelect: SelectConfig = { color: '#1d4ed8' };
const defaultActive: ActiveConfig = { color: '#60a5fa', duration: 150 };
const defaultSelect: SelectConfig = { color: '#1d4ed8', duration: 150 };

const resolvedEvents = (() => {
const origin = rest.events;
Expand All @@ -150,7 +160,7 @@ export function BubbleLayer({

// 气泡圆图层的 size 配置:当有 sizeField 时不传固定 size 避免冲突
const bubbleSizeProps = sizeField
? { sizeField, sizeValues: mappedSizeValues }
? { sizeField, sizeValues: mappedSizeValues, ...(sizeRange ? { sizeRange } : {}) }
: { size };

return (
Expand Down Expand Up @@ -195,7 +205,7 @@ export function BubbleLayer({
shapeValues="text"
color={labelColor}
size={labelSize}
zIndex={(rest.zIndex ?? 0) + 1}
zIndex={(rest.zIndex ?? 0) + 10}
style={{
textAnchor: labelAnchor,
textOffset: labelOffset ?? [0, 0],
Expand Down
25 changes: 18 additions & 7 deletions packages/core/src/components/CompositeLayer/ChinaDistrict.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,10 @@ export interface ChinaDistrictProps {
/** Tooltip 自定义字段 */
tooltipFields?: string[];

/** 区域点击事件 */
/** 区域单击事件 */
onRegionClick?: (feature: Record<string, unknown>, level: AdministrativeLevel) => void;
/** 区域双击事件(上卷时触发) */
onRegionDblclick?: (feature: Record<string, unknown>, level: AdministrativeLevel) => void;
/** 图层 zIndex */
zIndex?: number;
}
Expand Down Expand Up @@ -141,11 +143,12 @@ export const ChinaDistrict = React.forwardRef<ChinaDistrictHandle, ChinaDistrict
showLabel = true,
labelField = 'name',
labelSize = 12,
hoverHighlight = true,
clickSelect = true,
showTooltip = true,
hoverHighlight = false,
clickSelect = false,
showTooltip = false,
tooltipFields,
onRegionClick,
onRegionDblclick,
zIndex = 0,
} = props;
const scene = useScene();
Expand Down Expand Up @@ -288,7 +291,7 @@ export const ChinaDistrict = React.forwardRef<ChinaDistrictHandle, ChinaDistrict
}
}, [autoFitOnDrill, scene, displayData, drillPath.length]);

// 事件处理
// 事件处理:单击下钻
const handleClick = useCallback((payload: LayerEventPayload) => {
const feature = payload.feature;
if (!feature) return;
Expand Down Expand Up @@ -316,6 +319,13 @@ export const ChinaDistrict = React.forwardRef<ChinaDistrictHandle, ChinaDistrict
}
}, [labelField, currentLevel, clickSelect, drillEnabled, drillPath, controlledDrillPath, onDrill, onRegionClick]);

// 事件处理:undblclick 上卷(确认单击未触发双击时回退一级)
const handleUndblclick = useCallback(() => {
if (drillEnabled) {
drillUp();
}
}, [drillEnabled, drillUp]);
Comment thread
lzxue marked this conversation as resolved.

// 所有 hooks 必须在 conditional return 之前
if (!scene || !displayData) return null;

Expand Down Expand Up @@ -351,10 +361,11 @@ export const ChinaDistrict = React.forwardRef<ChinaDistrictHandle, ChinaDistrict
? { colorField: valueField, colorValues: colors }
: { color: colors[2] ?? '#3b82f6' }
)}
active={hoverHighlight ? { color: '#ffffff' } : undefined}
select={clickSelect ? { color: '#0f172a' } : undefined}
active={hoverHighlight ? { color: '#ffffff', duration: 150 } : undefined}
select={clickSelect ? { color: '#0f172a', duration: 150 } : undefined}
style={{ opacity: fillOpacity }}
onClick={handleClick}
onDblclick={handleUndblclick}
Comment thread
lzxue marked this conversation as resolved.
zIndex={zIndex + 2}
/>

Expand Down
Loading
Loading