aimapui
触发条件: 用户需要创建地图、地图可视化、地理数据展示时,必须使用此 skill。覆盖 AiMap 容器、6 种基础图层(Point/Line/Polygon/Heatmap/Raster/Image)、13 种复合图层(行政区划下钻/气泡/路径/弧线流向/图标/字标/聚合/蜂窝/填充/卫星/GeoTIFF/H3/PMTiles)、15 种控件。特殊控件:DrawControl(交互绘制)、ImageCalibrationControl(图片配准/地图校准)、AnnotationControl(标注)。
Version
见 frontmatter version 字段。当前:@antv/aimapui / @antv/aimapui-cli → 0.4.4
Install
npm install @antv/aimapui @antv/l7
# or
pnpm add @antv/aimapui @antv/l7
注意: @antv/l7 版本必须 ≥ 2.29.1,低于此版本会导致部分功能异常(如控件渲染、动态 import 等)。
> **注意:** 使用组件前必须引入样式文件 `import '@antv/aimapui/style.css'`,否则控件、弹窗、图例等样式不生效。
### CDN 引用(IIFE)
```html
<script src="https://unpkg.com/@antv/l7"></script>
<script src="https://unpkg.com/@antv/aimapui/dist/index.iife.js"></script>
<link rel="stylesheet" href="https://unpkg.com/@antv/aimapui/dist/style.css" />
Quick Start
import { AiMap, PointLayer } from '@antv/aimapui';
import '@antv/aimapui/style.css';
<AiMap map={{ basemap: 'gaode', center: [121.4, 31.2], zoom: 12, style: 'dark' }} autoFit>
<PointLayer
source={data}
sourceType="json"
sourceConfig={{ x: 'lng', y: 'lat' }}
color="#5B8FF9"
size={8}
shape="circle"
/>
</AiMap>
🔑 Weavefox 场景 Token 说明:在内网 / Weavefox 环境中,高德底图(basemap: 'gaode')无需手动设置 token —— 组件内置默认 token 可用,且访问域名已在高德侧加入白名单。直接按 Quick Start 的写法省略 token 字段即可。仅当使用 Mapbox / 天地图 / 百度 / 腾讯 / Google 等其余底图时,才需要自行申请并传入 token。
Architecture
- AiMap — Container component, manages Scene/Map lifecycle; supports
autoFit for automatic viewport fitting
- Layers — 6 base types:
PointLayer, LineLayer, PolygonLayer, HeatmapLayer, RasterLayer, ImageLayer。⚠️ 必须用 aimapui 封装的 React 组件(声明式、生命周期托管、含 schema/autoFit/EventBus);禁止绕过去 new L7 同名图层类 + scene.addLayer() 重新实现(这 6 个类名与 L7 同名,from '@antv/l7' 会拿到原生图层类)
- Composite Layers — Business-ready (13 types):
BubbleLayer, RouteLayer, ArcFlowLayer, IconLayer, GlyphLayer, ChinaDistrict, MarkerClusterLayer, HexagonLayer, FillLayer, SatelliteLayer, TiffRasterLayer, H3Layer, PMTilesLayer
- Controls —
ZoomControl, ResetViewControl, ScaleControl, FullscreenControl, GeoLocateControl, MapThemeControl, MouseLocationControl, ExportImageControl, LayerSwitchControl, LegendControl, LogoControl, SatelliteLayerControl, DrawControl, ImageCalibrationControl, AnnotationControl (15 types, 12 positions)
- Layer Comparison —
LayerCompare(独立容器,非 <AiMap> 内控件):双屏 / 卷帘对比,内部创建两个 L7 场景并以领航者机制逐帧双向同步相机
- Interactions —
Marker, Popup, Tooltip + Maki icon utilities (makiIconUrl, makiPinUrl, createMakiIconMap, createMakiPinMap, MAKI_ICONS, MAKI_ICON_NAMES)
- Legends —
LegendCategories, LegendRamp, LegendDiverging, LegendThreshold, LegendSize, LegendLineWidth, LegendProportion, LegendIcon (8 types)
- Mobile —
BottomSheet, MobileToolbar, MobileSheetLegend, SearchBar
- Hooks —
useResponsive, useScene, useMapPosition, useMapControl, useEventBus, useTheme
- ⚠️
useScene() / onSceneReady 拿到的是 L7 Scene,可用 setCenter/setZoom/setPitch/setRotation/setZoomAndCenter/fitBounds/panTo/zoomIn/zoomOut 等通用方法;没有 flyTo、easeTo、jumpTo 等 mapbox/maplibre 原生方法(调用会报 is not a function)。「定点飞行」用 scene.setZoomAndCenter(zoom, [lng, lat]) 或 setCenter+setZoom 组合。详见 aimap-container.md 的 Scene 操作方法 小节。
- Utilities —
ErrorBoundary, ResponsiveProvider, ThemeProvider, EventBus
- Schema Mode — Render entire map from a single
AiMapSchema JSON object
- Build Formats — ESM, CJS, IIFE (CDN), TypeScript declarations
- @antv/aimapui-plot — Separate package for tactical plot/bindtype components (
PlotControl, PlotToolbar)
Reference Docs (load as needed)
| Topic |
File |
When to load |
| AiMap container & MapSchema |
aimap-container.md |
Creating/configuring map |
| Basemap factory |
basemap-factory.md |
Custom basemap providers |
| EventBus |
event-bus.md |
Cross-component events |
| Schema system |
schema-system.md |
Schema/AI-driven maps |
| Data sources |
data-source.md |
JSON/GeoJSON/CSV/Raster data |
| Base layers (index + quick ref) |
index.md |
Point/Line/Polygon/Heatmap/Raster/Image (6 types) |
| Composite layers |
index.md |
Bubble/Route/ArcFlow/Icon/Glyph/ChinaDistrict/MarkerCluster/Hexagon/Fill/Satellite/TiffRaster/H3/PMTiles |
| H3Layer |
h3-layer.md |
H3 hexagonal grid visualization |
| Color/Size/Shape mapping |
mapping.md |
Data-driven visuals |
| Style config |
style.md |
Opacity/blend/style passthrough |
| Interactions (index + quick ref) |
index.md |
Marker/Popup/Tooltip/Maki icons (4 types) |
| Controls |
controls.md |
Zoom/Scale/Fullscreen/etc. |
| DrawControl |
draw-control.md |
Interactive drawing/editing |
| ImageCalibrationControl |
image-calibration-control.md |
Image georeferencing |
| AnnotationControl |
annotation-control.md |
Map annotation |
| LayerCompare |
layer-compare.md |
双屏/卷帘图层对比 |
| Legends |
legend-components.md |
Map legends |
| Mobile (index + quick ref) |
index.md |
MobileToolbar/BottomSheet/MobileSheetLegend/SearchBar |
Common Mistakes
| 错误 |
现象 |
解决方案 |
| 绕过 aimapui 直接调 L7 图层 |
不用 aimapui 的 React 图层组件,而是 import { PointLayer } from '@antv/l7' + new PointLayer(...) + scene.addLayer(...) 重新实现 —— 重复造轮子、丢失 schema/autoFit/EventBus/响应式/生命周期托管;且这 6 个类名与 aimapui 同名,from 错就会落到 L7 原生图层类 |
必须 import { PointLayer } from '@antv/aimapui' 用声明式组件;@antv/l7 只用于底图引擎(GaodeMap 等)和 Scene 类型 |
| 未引入 style.css |
控件/弹窗/图例样式丢失 |
import '@antv/aimapui/style.css'(CDN 用 <link>) |
| 容器无高度 |
地图不显示 |
确保父容器有明确高度,或给 AiMap 设置 style={{ height: '100vh' }} |
| map 与 schema 同时传入 |
报错或地图异常 |
只传一个,两者互斥 |
| sourceConfig 字段名错误 |
数据点不显示或偏移 |
JSON 数据必须指定 x/y 字段名,如 sourceConfig={{ x: 'lng', y: 'lat' }} |
| GeoJSON 格式不对 |
PolygonLayer 不渲染 |
必须是标准 FeatureCollection,不能是裸 Geometry |
| Token 缺失 |
除高德外的底图空白(Mapbox / 天地图 / 百度 / 腾讯 / Google 等) |
高德地图在 Weavefox 场景下无需设 token(组件内置默认 token,访问域名已加白);其余底图仍需 map={{ basemap: 'mapbox', token: 'YOUR_TOKEN' }} |
| TouchGesturePanel 使用 |
功能不存在 |
此组件尚未实现,请勿使用 |
Key Patterns
Visual Mapping (数据驱动样式)
所有图层支持 固定值 和 字段映射 两种模式:
// 固定值
<PointLayer source={data} color="#5B8FF9" size={12} />
// 字段映射
<PointLayer colorField="type" colorValues={['#f00','#0f0','#00f']} sizeField="value" sizeValues={[4,20]} />
详见 → mapping.md
Schema Mode (AI/JSON 驱动地图)
用单个 JSON 对象渲染完整地图,适合 AI 生成或配置化场景:
import { AiMap } from '@antv/aimapui';
const schema = { map: { basemap: 'gaode', center: [121,31], zoom: 12 }, layers: [...], controls: [...] };
<AiMap schema={schema} />
map 和 schema 互斥,禁止同时传入。
详见 → schema-system.md
Composite Layers (复合图层)
复合图层是业务开箱即用的高级组件。各图层详细用法见对应 reference 文件:
| 图层 |
Reference |
一句话说明 |
| ChinaDistrict |
china-district.md |
行政区划下钻 + 业务数据色阶绑定 |
| BubbleLayer |
bubble-layer.md |
气泡大小编码数值 |
| RouteLayer |
route-layer.md |
路径地图(默认 Marker 编号标注,支持 point/marker/icon 模式;静态/驾车/步行/骑行/公交) |
| ArcFlowLayer |
arc-flow-layer.md |
OD 弧线流向动画 |
| IconLayer |
icon-layer.md |
自定义图片图标 + Maki 内置图标 |
| GlyphLayer |
glyph-layer.md |
图标字体标注(Material Symbols) |
| MarkerClusterLayer |
marker-cluster-layer.md |
聚合标注 |
| HexagonLayer |
hexagon-layer.md |
蜂窝热力 |
| FillLayer |
fill-layer.md |
区域填充 |
| SatelliteLayer |
satellite-layer.md |
卫星影像 |
| TiffRasterLayer |
tiff-raster-layer.md |
GeoTIFF 栅格 |
| H3Layer |
h3-layer.md |
H3 六边形网格 |
Special Controls (特殊控件)
| 控件 |
Reference |
说明 |
| DrawControl |
draw-control.md |
交互绘制(点/线/面/矩形/圆) |
| ImageCalibrationControl |
image-calibration-control.md |
图片配准/地理校准(上传、角点拖拽、透视变换、瓦片导出) |
| AnnotationControl |
annotation-control.md |
标注(marker/highlighter/text/note/link/image/video) |
Layer Compare (图层对比)
LayerCompare 是 独立容器(不放入 <AiMap> 内部),在同一区域渲染两个同步场景,支持双屏(split)与卷帘(swipe)对比,可拖动分隔条控制两侧范围。两侧相机逐帧同步,卷帘可拖动地图、双屏联动平滑,sync={false} 可关闭。
<LayerCompare
mode="swipe"
map={{ basemap: 'gaode', center: [116.4, 39.91], zoom: 12 }}
before={<SatelliteLayer provider="gaode" />}
after={<BubbleLayer source={pois} sourceType="json" sourceConfig={{ x: 'lng', y: 'lat' }} colorField="category" sizeField="value" sizeRange={[8, 26]} />}
/>
详见 → layer-compare.md
Maki Icon Utilities (内置 200+ 矢量图标)
import { makiIconUrl, createMakiIconMap } from '@antv/aimapui';
// 单个图标 → makiIconUrl('cafe', { size: 32, fill: '#333' })
// 批量映射 → createMakiIconMap(['cafe', 'bus', 'hospital']) // 用于 IconLayer.iconMap
详见 → maki-icons.md
1---2name: skill3description: 基于 @antv/aimapui 的 React 地图可视化组件库。当用户需要创建地图、配置地图图层、构建地理可视化或地图控件时使用本 skill。覆盖 AiMap 容器、6 种基础图层(Point/Line/Polygon/Heatmap/Raster/Image)、13 种复合图层(含 PMTilesLayer)、15 种控件、交互组件、图例、移动端组件,并支持 schema/JSON 驱动模式。基于 L7,Schema 驱动。4---56# aimapui78**触发条件:** 用户需要创建地图、地图可视化、地理数据展示时,必须使用此 skill。覆盖 AiMap 容器、6 种基础图层(Point/Line/Polygon/Heatmap/Raster/Image)、13 种复合图层(行政区划下钻/气泡/路径/弧线流向/图标/字标/聚合/蜂窝/填充/卫星/GeoTIFF/H3/PMTiles)、15 种控件。特殊控件:DrawControl(交互绘制)、ImageCalibrationControl(图片配准/地图校准)、AnnotationControl(标注)。910## Version1112见 frontmatter `version` 字段。当前:`@antv/aimapui` / `@antv/aimapui-cli` → **0.4.4**1314## Install1516```bash17npm install @antv/aimapui @antv/l718# or19pnpm add @antv/aimapui @antv/l720```2122> **注意:** `@antv/l7` 版本必须 **≥ 2.29.1**,低于此版本会导致部分功能异常(如控件渲染、动态 import 等)。23```2425> **注意:** 使用组件前必须引入样式文件 `import '@antv/aimapui/style.css'`,否则控件、弹窗、图例等样式不生效。2627### CDN 引用(IIFE)2829```html30<script src="https://unpkg.com/@antv/l7"></script>31<script src="https://unpkg.com/@antv/aimapui/dist/index.iife.js"></script>32<link rel="stylesheet" href="https://unpkg.com/@antv/aimapui/dist/style.css" />33```3435## Quick Start3637```tsx38import { AiMap, PointLayer } from '@antv/aimapui';39import '@antv/aimapui/style.css';4041<AiMap map={{ basemap: 'gaode', center: [121.4, 31.2], zoom: 12, style: 'dark' }} autoFit>42 <PointLayer43 source={data}44 sourceType="json"45 sourceConfig={{ x: 'lng', y: 'lat' }}46 color="#5B8FF9"47 size={8}48 shape="circle"49 />50</AiMap>51```5253> **🔑 Weavefox 场景 Token 说明**:在内网 / Weavefox 环境中,**高德底图(`basemap: 'gaode'`)无需手动设置 `token`** —— 组件内置默认 token 可用,且访问域名已在高德侧加入白名单。直接按 Quick Start 的写法省略 `token` 字段即可。仅当使用 Mapbox / 天地图 / 百度 / 腾讯 / Google 等其余底图时,才需要自行申请并传入 `token`。5455## Architecture5657- **AiMap** — Container component, manages Scene/Map lifecycle; supports `autoFit` for automatic viewport fitting58- **Layers** — 6 base types: `PointLayer`, `LineLayer`, `PolygonLayer`, `HeatmapLayer`, `RasterLayer`, `ImageLayer`。⚠️ **必须用 aimapui 封装的 React 组件**(声明式、生命周期托管、含 schema/autoFit/EventBus);**禁止绕过去 `new` L7 同名图层类 + `scene.addLayer()` 重新实现**(这 6 个类名与 L7 同名,`from '@antv/l7'` 会拿到原生图层类)59- **Composite Layers** — Business-ready (13 types): `BubbleLayer`, `RouteLayer`, `ArcFlowLayer`, `IconLayer`, `GlyphLayer`, `ChinaDistrict`, `MarkerClusterLayer`, `HexagonLayer`, `FillLayer`, `SatelliteLayer`, `TiffRasterLayer`, `H3Layer`, `PMTilesLayer`60- **Controls** — `ZoomControl`, `ResetViewControl`, `ScaleControl`, `FullscreenControl`, `GeoLocateControl`, `MapThemeControl`, `MouseLocationControl`, `ExportImageControl`, `LayerSwitchControl`, `LegendControl`, `LogoControl`, `SatelliteLayerControl`, `DrawControl`, `ImageCalibrationControl`, `AnnotationControl` (15 types, 12 positions)61- **Layer Comparison** — `LayerCompare`(独立容器,非 `<AiMap>` 内控件):双屏 / 卷帘对比,内部创建两个 L7 场景并以领航者机制逐帧双向同步相机62- **Interactions** — `Marker`, `Popup`, `Tooltip` + Maki icon utilities (`makiIconUrl`, `makiPinUrl`, `createMakiIconMap`, `createMakiPinMap`, `MAKI_ICONS`, `MAKI_ICON_NAMES`)63- **Legends** — `LegendCategories`, `LegendRamp`, `LegendDiverging`, `LegendThreshold`, `LegendSize`, `LegendLineWidth`, `LegendProportion`, `LegendIcon` (8 types)64- **Mobile** — `BottomSheet`, `MobileToolbar`, `MobileSheetLegend`, `SearchBar`65- **Hooks** — `useResponsive`, `useScene`, `useMapPosition`, `useMapControl`, `useEventBus`, `useTheme`66 - ⚠️ `useScene()` / `onSceneReady` 拿到的是 L7 `Scene`,可用 `setCenter/setZoom/setPitch/setRotation/setZoomAndCenter/fitBounds/panTo/zoomIn/zoomOut` 等通用方法;**没有** `flyTo`、`easeTo`、`jumpTo` 等 mapbox/maplibre 原生方法(调用会报 `is not a function`)。「定点飞行」用 `scene.setZoomAndCenter(zoom, [lng, lat])` 或 `setCenter+setZoom` 组合。详见 [aimap-container.md](references/core/aimap-container.md) 的 *Scene 操作方法* 小节。67- **Utilities** — `ErrorBoundary`, `ResponsiveProvider`, `ThemeProvider`, `EventBus`68- **Schema Mode** — Render entire map from a single `AiMapSchema` JSON object69- **Build Formats** — ESM, CJS, IIFE (CDN), TypeScript declarations70- **@antv/aimapui-plot** — Separate package for tactical plot/bindtype components (`PlotControl`, `PlotToolbar`)7172## Reference Docs (load as needed)7374| Topic | File | When to load |75|-------|------|-------------|76| AiMap container & MapSchema | [aimap-container.md](references/core/aimap-container.md) | Creating/configuring map |77| Basemap factory | [basemap-factory.md](references/core/basemap-factory.md) | Custom basemap providers |78| EventBus | [event-bus.md](references/core/event-bus.md) | Cross-component events |79| Schema system | [schema-system.md](references/schema/schema-system.md) | Schema/AI-driven maps |80| Data sources | [data-source.md](references/data/data-source.md) | JSON/GeoJSON/CSV/Raster data |81| Base layers (index + quick ref) | [index.md](references/layers/index.md) | Point/Line/Polygon/Heatmap/Raster/Image (6 types) |82| Composite layers | [index.md](references/composite/index.md) | Bubble/Route/ArcFlow/Icon/Glyph/ChinaDistrict/MarkerCluster/Hexagon/Fill/Satellite/TiffRaster/H3/PMTiles |83| H3Layer | [h3-layer.md](references/composite/h3-layer.md) | H3 hexagonal grid visualization |84| Color/Size/Shape mapping | [mapping.md](references/layers/mapping.md) | Data-driven visuals |85| Style config | [style.md](references/layers/style.md) | Opacity/blend/style passthrough |86| Interactions (index + quick ref) | [index.md](references/interaction/index.md) | Marker/Popup/Tooltip/Maki icons (4 types) |87| Controls | [controls.md](references/controls/controls.md) | Zoom/Scale/Fullscreen/etc. |88| DrawControl | [draw-control.md](references/controls/draw-control.md) | Interactive drawing/editing |89| ImageCalibrationControl | [image-calibration-control.md](references/controls/image-calibration-control.md) | Image georeferencing |90| AnnotationControl | [annotation-control.md](references/controls/annotation-control.md) | Map annotation |91| LayerCompare | [layer-compare.md](references/controls/layer-compare.md) | 双屏/卷帘图层对比 |92| Legends | [legend-components.md](references/legend/legend-components.md) | Map legends |93| Mobile (index + quick ref) | [index.md](references/mobile/index.md) | MobileToolbar/BottomSheet/MobileSheetLegend/SearchBar |9495## Common Mistakes9697| 错误 | 现象 | 解决方案 |98|------|------|---------|99| **绕过 aimapui 直接调 L7 图层** | 不用 aimapui 的 React 图层组件,而是 `import { PointLayer } from '@antv/l7'` + `new PointLayer(...)` + `scene.addLayer(...)` 重新实现 —— 重复造轮子、丢失 schema/autoFit/EventBus/响应式/生命周期托管;且这 6 个类名与 aimapui 同名,`from` 错就会落到 L7 原生图层类 | **必须** `import { PointLayer } from '@antv/aimapui'` 用声明式组件;`@antv/l7` 只用于底图引擎(`GaodeMap` 等)和 `Scene` 类型 |100| 未引入 style.css | 控件/弹窗/图例样式丢失 | `import '@antv/aimapui/style.css'`(CDN 用 `<link>`) |101| 容器无高度 | 地图不显示 | 确保父容器有明确高度,或给 AiMap 设置 `style={{ height: '100vh' }}` |102| map 与 schema 同时传入 | 报错或地图异常 | 只传一个,两者互斥 |103| sourceConfig 字段名错误 | 数据点不显示或偏移 | JSON 数据必须指定 `x`/`y` 字段名,如 `sourceConfig={{ x: 'lng', y: 'lat' }}` |104| GeoJSON 格式不对 | PolygonLayer 不渲染 | 必须是标准 FeatureCollection,不能是裸 Geometry |105| Token 缺失 | 除高德外的底图空白(Mapbox / 天地图 / 百度 / 腾讯 / Google 等) | 高德地图在 Weavefox 场景下**无需设 token**(组件内置默认 token,访问域名已加白);其余底图仍需 `map={{ basemap: 'mapbox', token: 'YOUR_TOKEN' }}` |106| TouchGesturePanel 使用 | 功能不存在 | 此组件尚未实现,请勿使用 |107108## Key Patterns109110### Visual Mapping (数据驱动样式)111112所有图层支持 **固定值** 和 **字段映射** 两种模式:113114```tsx115// 固定值116<PointLayer source={data} color="#5B8FF9" size={12} />117118// 字段映射119<PointLayer colorField="type" colorValues={['#f00','#0f0','#00f']} sizeField="value" sizeValues={[4,20]} />120```121122详见 → [mapping.md](references/layers/mapping.md)123124### Schema Mode (AI/JSON 驱动地图)125126用单个 JSON 对象渲染完整地图,适合 AI 生成或配置化场景:127128```tsx129import { AiMap } from '@antv/aimapui';130const schema = { map: { basemap: 'gaode', center: [121,31], zoom: 12 }, layers: [...], controls: [...] };131<AiMap schema={schema} />132```133134> `map` 和 `schema` 互斥,禁止同时传入。135136详见 → [schema-system.md](references/schema/schema-system.md)137138### Composite Layers (复合图层)139140复合图层是业务开箱即用的高级组件。各图层详细用法见对应 reference 文件:141142| 图层 | Reference | 一句话说明 |143|------|-----------|-----------|144| ChinaDistrict | [china-district.md](references/composite/china-district.md) | 行政区划下钻 + 业务数据色阶绑定 |145| BubbleLayer | [bubble-layer.md](references/composite/bubble-layer.md) | 气泡大小编码数值 |146| RouteLayer | [route-layer.md](references/composite/route-layer.md) | 路径地图(默认 Marker 编号标注,支持 point/marker/icon 模式;静态/驾车/步行/骑行/公交) |147| ArcFlowLayer | [arc-flow-layer.md](references/composite/arc-flow-layer.md) | OD 弧线流向动画 |148| IconLayer | [icon-layer.md](references/composite/icon-layer.md) | 自定义图片图标 + Maki 内置图标 |149| GlyphLayer | [glyph-layer.md](references/composite/glyph-layer.md) | 图标字体标注(Material Symbols) |150| MarkerClusterLayer | [marker-cluster-layer.md](references/composite/marker-cluster-layer.md) | 聚合标注 |151| HexagonLayer | [hexagon-layer.md](references/composite/hexagon-layer.md) | 蜂窝热力 |152| FillLayer | [fill-layer.md](references/composite/fill-layer.md) | 区域填充 |153| SatelliteLayer | [satellite-layer.md](references/composite/satellite-layer.md) | 卫星影像 |154| TiffRasterLayer | [tiff-raster-layer.md](references/composite/tiff-raster-layer.md) | GeoTIFF 栅格 |155| H3Layer | [h3-layer.md](references/composite/h3-layer.md) | H3 六边形网格 |156157### Special Controls (特殊控件)158159| 控件 | Reference | 说明 |160|------|-----------|------|161| DrawControl | [draw-control.md](references/controls/draw-control.md) | 交互绘制(点/线/面/矩形/圆) |162| ImageCalibrationControl | [image-calibration-control.md](references/controls/image-calibration-control.md) | 图片配准/地理校准(上传、角点拖拽、透视变换、瓦片导出) |163| AnnotationControl | [annotation-control.md](references/controls/annotation-control.md) | 标注(marker/highlighter/text/note/link/image/video) |164165### Layer Compare (图层对比)166167`LayerCompare` 是 **独立容器**(不放入 `<AiMap>` 内部),在同一区域渲染两个同步场景,支持双屏(`split`)与卷帘(`swipe`)对比,可拖动分隔条控制两侧范围。两侧相机逐帧同步,卷帘可拖动地图、双屏联动平滑,`sync={false}` 可关闭。168169```tsx170<LayerCompare171 mode="swipe"172 map={{ basemap: 'gaode', center: [116.4, 39.91], zoom: 12 }}173 before={<SatelliteLayer provider="gaode" />}174 after={<BubbleLayer source={pois} sourceType="json" sourceConfig={{ x: 'lng', y: 'lat' }} colorField="category" sizeField="value" sizeRange={[8, 26]} />}175/>176```177178详见 → [layer-compare.md](references/controls/layer-compare.md)179180### Maki Icon Utilities (内置 200+ 矢量图标)181182```tsx183import { makiIconUrl, createMakiIconMap } from '@antv/aimapui';184// 单个图标 → makiIconUrl('cafe', { size: 32, fill: '#333' })185// 批量映射 → createMakiIconMap(['cafe', 'bus', 'hospital']) // 用于 IconLayer.iconMap186```187188详见 → [maki-icons.md](references/interaction/maki-icons.md)