Feat/typhoon map demo - #1
Conversation
- 新增 TyphoonMap 应用模板:历史路径按等级分段着色+动画、台风眼标记、 7/10/12 级四象限风圈、多家机构预报路径同图对比(选中机构粗实线高亮, 其余淡色长虚线)、台风列表+信息卡+等级/风圈图例;数据来源浙江水利台风 API - 修复 LineLayer path 数据字段名(应为 `path` 而非 `coordinates`),否则 source extent 解析抛 "reading '0'" 导致地图渲染崩溃 - 修复预报数据接线:真实 API 的预报内嵌在每个历史点的 forecast 字段, 而非顶层 info.forecast;改为从 selectedPoint/currentPoint 读取 - 统一 l7 版本到 2.29.0,消除 @antv/l7-scene 重复安装导致的 Scene 类型冲突 - 修复 ImageCalibrationControl 其他阶段 corners 为 null 的跳过判断 - 修复 MobileApp RouteLayer 已废弃 prop stopIconColor -> stopColor - 修复 MarkerCluster onClusterClick 参数 leaves 声明为可选(与类型签名一致) - 新增 site vite-env.d.ts 补齐 import.meta.glob 类型 Co-Authored-By: Claude <noreply@anthropic.com>
L7 的 lineType:'dash' 在当前线段长度/缩放下退化为不可辨的点串, 其他机构预报改用细实线(2px,opacity 0.5),选中机构保持粗实线高亮 (3.5px,opacity 0.95)。图例小色条同步改为实线。 Co-Authored-By: Claude <noreply@anthropic.com>
- 历史轨迹改为纯实线按等级着色,移除轨迹动画(及废弃的动画开关按钮) - 其他机构预报路径用淡色长虚线、选中机构用粗虚线高亮,虚线在短线段/ 低缩放下也可辨(L7 dashArray 加大 + 线宽增粗) - 新增:点击台风路径节点 → 显示该点详情 Popup(强度/风力/风速/气压/经纬度) - 新增:点击任一预报线路 → 显示对应机构预报 Popup(经纬度/路径类型), 选中机构点击仍保留 active 高亮 - 预报段数据补 agency 字段并用 colorField 渲染,便于点击回溯机构 Popup 绑定参照 BubbleLayer demo 的 onClick+payload.feature 模式。 Co-Authored-By: Claude <noreply@anthropic.com>
接入浙江水利同域气象数据服务(与台风 API 同 base),实现 5 类气象图层
单选叠加 + 透明度调节 + 数据时间显示:
- 云图 /Api/LeastCloud?type=1|3|6 → base64 PNG + 返回的 extent 边界,
L7 ImageLayer 叠加; 支持 1h/3h/6h 时段切换(重新拉取)
- 雷达 /Api/LastRadar → 4 片 base64 PNG(radar0_0/0_1/1_0/1_1) 2x2 国家
拼图 + synTime/radarType; 按 app.js 客户端硬编码的 4 象限
extent 拼接(radarType=2 时为单片全幅)
- 降雨 /Api/LeastRain/24 → contours(双重编码 JSON, latAndLong 为
[lat,lng]) 转 [lng,lat] path, LineLayer colorField=color 渲染等值线
- 卫星 复用 SatelliteLayer(高德影像), 开启时底图强制 light 以亮显影像
- 风场 数据为 GRIB2(/Api/LastWind), 暂作占位(开发中, 单独攻关)
控件:右中浮动面板,6 宫格单选(无/云图/雷达/降雨/卫星/风场)+ 云图时段
切换 + 透明度滑块 + 数据时间徽标, 与现有地图控件无冲突(独立 absolute 面板)。
数据按需拉取并缓存, 切换不重复请求。
Co-Authored-By: Claude <noreply@anthropic.com>
- FillLayer/BubbleLayer/H3Layer/HexagonLayer 增加 colorScheme 语义化色板预设 - BubbleLayer 支持 sizeField + sizeRange 比例符号 - Popup 增加结构化布局预设 popupLayout - 新增 ResetViewControl 控件 - hover/click 状态增加过渡动画 transitionDuration - PointLayer/IconLayer 增加 accuracy prop 区分精确/模糊定位 - 新增 map-app-builder skill 及 PC/移动端/垂类场景参考文档 - 新增 Google Maps Mobile 设计语言独立参考文件
- 添加 ...rest 解构修复 rest.zIndex 引用错误 - 增加坐标有效性校验避免 LngLat(NaN, NaN) - 调整点位序号 textAnchor 为 bottom,文字为 top 避免重叠 - 恢复 marker 标注原始尺寸 (circle 24px / dot 18px) - 增大文字标签偏移量改善视觉节奏
- TyphoonMap: 添加移动端响应式布局(导航条全宽、信息卡隐藏、列表收起为icon、工具条移至导航下方、图例右侧滑入) - TyphoonMap: 支持 mobilePreview prop 用于 BlockPage 手机容器预览 - TyphoonMap: 台风列表点击展开点位详情表格 - BlockPage: 新增 device=both 支持,添加桌面端/移动端预览切换按钮 - main.tsx: TyphoonMap device 改为 both,默认 demo 改为 Marker - Popup/Tooltip: z-index 层级调整,Popup 添加 data-theme 暗色适配 - MapThemeControl: 弹出面板暗色主题 + z-index 修复 - skills/map-design: 重组为 specs(规范) + scenes(场景) 双层结构
- point 模式: 圆点 anchor=center,序号 center 居中,名称 textOffset=-3*stopSize 在下方 - icon 模式: stopIconSize 默认 16,名称紧贴图标下方无偏移,demo 不显示序号 - marker 模式: circle 18px/fontSize 12,名称偏移 -(radius+4),去掉 boxShadow - demo 简化:三种模式只传最小必要参数,其余走默认值
- BottomSheet: 外层容器 pointerEvents 改为 none,内容区保持 auto,避免拦截地图事件 - GoogleMapsMobileDemo: Status Bar/Search Bar/Pills/Left Column 添加 pointerEvents: none/auto 分层处理 - MapSceneRenderer: applyGestureConfig 增加 interactionService 直接操作作为兜底 - AiMap: 显式传递 gestureConfig 确保手势启用
- 新增 WindFieldLayer.tsx: Canvas 粒子动画风场渲染组件 - 修改 api.ts: 新增 fetchWindFieldRaw 获取原始 U/V 网格数据 - 修改 types.ts: 新增 WindFieldRawData 类型定义 - 修改 useWeatherData.ts: 添加风场状态管理和按需加载 - 修改 TyphoonMapLayers.tsx: 集成 WindFieldLayer 组件 - 修改 WeatherToolbar.tsx: 添加风场切换按钮,修复定位问题 - 修改 TyphoonMap.tsx: 调整 PC 端工具条和信息卡布局为右上角垂直排列 - 修改 TyphoonInfoCard.tsx: PC 端改为相对定位适配 flex 布局 - 风场 Canvas 挂载到 L7 getMapCanvasContainer 确保在可视化图层下方
- 删除 glow / animate / animateSpeed props(接口定义与默认值) - 移除发光层与流动虚线粒子层的渲染逻辑 - 同步更新设计规范与使用文档,去除发光/动画相关章节与示例 - demo 去掉 glow / animate 用法,避免引用已删除的 prop RouteLayer 仅保留必要的实线路径渲染(含分段着色)与途经点能力。
- AppleMapsDemo: emoji 图标统一替换为 material-symbols,玻璃按钮背景调亮 - GoogleMapsMobileDemo: 新增搜索框输入与结果列表、导航模式(路线绘制+视野适配)、 BottomCard 改为全屏详情页带关闭按钮,搜索/操作栏层级与定位微调 - useWeatherData: 默认天气图层由 'wind' 改为 'none'
- SKILL.md 版本号 0.3.5→0.4.1,控件数 13→15 - 补充 H3Layer、RouteLayer、AnnotationControl 站点文档 - 补充 ResetViewControl、LogoControl、LegendControl、SatelliteLayerControl 站点文档 - 删除 RouteLayer 已废弃属性文档(glow/animate/animateSpeed) - controls.md skill reference 补齐 ResetViewControl - CHANGELOG.md 补录 0.3.2~0.4.1 变更记录 - SKILL.md 补充 @antv/aimapui-plot 包说明
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
postcss.config.mjs 引用了 @tailwindcss/postcss 但 devDependencies 中未声明,导致构建失败。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1. 修复 SchemaLayer.sortValue 递归遍历对象时遇到循环引用导致 Maximum call stack size exceeded 的问题,通过 WeakSet 检测 已访问对象并返回 '[Circular]' 标记。 2. SchemaLayer/PolygonLayer 新增 onDblclick/onUndblclick 事件, ChinaDistrict 下钻模式支持双击上卷。 3. Demo 站点 UI 覆盖层 zIndex 统一调整为 1000。 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- 升级 @antv/l7 至 2.29.1(推荐 ≥2.29.1),移除 @antv/l7-maps 直接依赖, 底图引擎统一从 @antv/l7 引入;同步 package.json/registry.json/文档与 pnpm-lock - 去除全部 @antv/l7-maps 引用(install 命令 / CDN / import 示例),更新底图引擎导入说明 - 修复 skill 场景文档误用 scene.flyTo,新增「Scene 操作方法」小节(基于 L7 2.29 真实类型声明)与不可用方法警告,修正 type Scene 的 import 来源为 @antv/l7 - 强调必须使用 aimapui 封装的 React 图层组件,禁止绕过 aimapui 直接 new L7 图层类 + scene.addLayer 重新实现 - RouteLayer: stopRenderer 默认 'point' → 'marker',showStopPopup 默认 true → false - cli: --version 改为动态读取 package.json
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Code Review
This pull request upgrades the @antv/l7 dependency to 2.29.1, removes the @antv/l7-maps dependency, and introduces several new components, features, and demos, including a new ResetViewControl and a comprehensive TyphoonMap demo. The review feedback highlights several critical issues and improvement opportunities: addressing click conflicts in ChinaDistrict by using onUndblclick and onDblclick; capturing the actual initial map view in ResetViewControl instead of using hardcoded defaults; stopping click propagation in Popup to prevent premature closing on map unclick; adding defensive checks in the typhoon API to avoid runtime crashes; removing redundant checks in ImageCalibrationControl; and correcting API usage such as fitBounds padding in AppleMapsDemo and LegendCategories props in LegendPanel.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
…istry Regenerate pnpm-lock against https://registry.npmjs.org/ from a clean store so every integrity hash is the public-registry value (incl. debug@4.4.3 -> sha512-RGwwWnwQvk...). Pin Vercel installCommand to the same public registry so the install target matches the locked hashes. This supersedes the earlier internal-registry pin (4906fc7), which was a workaround for the previous internally-checksummed lockfile.
Vercel does a fresh checkout where packages/plot/dist does not exist (dist/ is gitignored). site imports @antv/aimapui-plot, whose package.json exports point at dist/index.es.js, so vite could not resolve its entry — build failed: 'Failed to resolve entry for package "@antv/aimapui-plot"'. core is already aliased to source (commit 0c83624) to avoid building core first. Apply the same pattern to plot: alias @antv/aimapui-plot to ../plot/src/index.ts. plot's source imports only core (already aliased), @antv/l7, react, geojson, and relative css — all resolvable by vite. Verified by removing packages/plot/dist and building site: 62 pages generated successfully.
No description provided.