본문으로 건너뛰기
cccskills
무료GitHub에 공개

antv-l7

Comprehensive guide for AntV L7 geospatial visualization library. Use when users need to: (1) Create interactive maps with WebGL rendering (2) Visualize geographic data (points, lines, polygons, heatmaps) (3) Build location-based data dashboards (4) Add map layers, interactions, or animations (5) Process and display GeoJSON, CSV, or other spatial data (6) Integrate maps with AMap (GaodeMap), Mapbox, Maplibre, or standalone L7 Map (7) Optimize performance for large-scale geographic datasets

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(36)

  • SKILL.md6.8 KB
  • COMPLETENESS_REPORT.md10.4 KB
  • index.md4.4 KB
  • metadata/skill-dependency.json3.2 KB
  • metadata/skill-tags.json2.5 KB
  • metadata/version-compatibility.json1.5 KB
  • README.md6.5 KB
  • references/animation/layer-animation.md6.4 KB
  • references/core/map-types.md13.8 KB
  • references/core/scene-lifecycle.md9.6 KB
  • references/core/scene-methods.md15.9 KB
  • references/core/scene.md10.2 KB
  • references/data/source-csv.md10.7 KB
  • references/data/source-geojson.md9.6 KB
  • references/data/source-json.md12.6 KB
  • references/data/source-mvt.md13.3 KB
  • references/data/source-parser.md12.0 KB
  • references/data/source-raster.md20.8 KB
  • references/interaction/components.md3.8 KB
  • references/interaction/controls.md15.6 KB
  • references/interaction/events.md9.8 KB
  • references/interaction/layer-popup.md17.3 KB
  • references/interaction/marker-layer.md19.7 KB
  • references/interaction/popup.md9.2 KB
  • references/layers/base-layer.md14.1 KB
  • references/layers/heatmap.md10.0 KB
  • references/layers/image.md12.2 KB
  • references/layers/line.md10.0 KB
  • references/layers/point.md10.8 KB
  • references/layers/polygon.md9.4 KB
  • references/layers/raster.md13.7 KB
  • references/layers/tile-raster.md16.6 KB
  • references/layers/tile-vector.md13.4 KB
  • references/performance/optimization.md7.4 KB
  • references/visual/mapping.md12.9 KB
  • references/visual/style.md11.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

AntV L7 Geospatial Visualization

AntV L7 是基于 WebGL 的大规模地理空间数据可视化引擎,支持多种地图底图和丰富的可视化图层类型。

Quick Start

创建最简单的 L7 地图应用:

import { Scene, PointLayer } from '@antv/l7';
import { GaodeMap } from '@antv/l7-maps';

// 1. 初始化场景
const scene = new Scene({
  id: 'map',
  map: new GaodeMap({
    center: [120.19, 30.26],
    zoom: 10,
    style: 'light',
  }),
});

// 2. 添加图层
scene.on('loaded', () => {
  const pointLayer = new PointLayer()
    .source(data, {
      parser: { type: 'json', x: 'lng', y: 'lat' },
    })
    .shape('circle')
    .size(10)
    .color('#5B8FF9');

  scene.addLayer(pointLayer);
});

Core Workflow

L7 的典型开发流程:

1. 场景初始化 (Scene) → 2. 数据准备 → 3. 创建图层 (Layer) → 4. 添加交互 → 5. 优化性能

📚 Reference Documentation

详细文档按领域组织,根据需要加载:

基础功能 (references/core/)

  • scene.md - Scene 初始化、生命周期、方法
  • map-types.md - GaodeMap、Mapbox、Maplibre、Map 的配置

数据处理 (references/data/)

  • geojson.md - GeoJSON 格式、解析、转换
  • csv.md - CSV 数据加载和处理
  • json.md - JSON 数据、OD 数据、路径数据
  • parser.md - Parser 配置、Transform 转换
  • source-raster.md - 栅格数据源(GeoTIFF、多波段、遥感影像)

图层类型 (references/layers/)

视觉映射 (references/visual/)

  • mapping.md - 颜色、大小、形状映射
  • style.md - 透明度、描边、纹理等样式

交互组件 (references/interaction/)

动画效果 (references/animation/)

性能优化 (references/performance/)

使用指南

按用户需求选择文档

用户请求示例加载的文档
"创建一个地图"core/scene.md, core/map-types.md
"显示点位数据"layers/point.md, data/geojson.md
"绘制路径"layers/line.md
"热力图"layers/heatmap.md
"加载卫星影像"layers/tile-raster.md, data/source-raster.md
"添加点击事件"interaction/events.md
"显示弹窗"interaction/popup.md, interaction/layer-popup.md
"添加标注"interaction/components.md, interaction/marker-layer.md
"添加控件"interaction/controls.md

技能组合模式

复杂需求需要组合多个技能:

城市可视化 = scene + polygon + point + events + popup
轨迹动画 = scene + line + animation
热力分析 = scene + heatmap + data/json

依赖检查

使用 metadata/skill-dependency.json 检查技能依赖关系:

{
  "point-layer": {
    "requires": ["scene-initialization"],
    "optional": ["source-geojson", "color-mapping"],
    "nextSteps": ["event-handling", "popup"]
  }
}

版本信息

  • 当前版本: L7 2.x
  • 浏览器支持: Chrome ≥60, Firefox ≥60, Safari ≥12
  • 坐标系: WGS84 (地理坐标) / Plane coordinates (独立 Map)
  • 底图: 高德地图、Mapbox、Maplibre、L7 Map (独立)

最佳实践

  1. 场景初始化优先: 始终从创建 Scene 开始
  2. 数据格式规范: 优先使用 GeoJSON 标准格式
  3. 性能优先: 大数据量时使用数据过滤和聚合
  4. 渐进增强: 先实现基础功能,再添加交互和动画
  5. 错误处理: 添加事件监听和数据验证

快速参考

常用导入

// 核心
import { Scene } from '@antv/l7';
import { GaodeMap } from '@antv/l7-maps';

// 图层
import { PointLayer, LineLayer, PolygonLayer, HeatmapLayer } from '@antv/l7';

// 组件
import { Popup, Marker } from '@antv/l7';

地图样式选项

  • 'light' - 浅色风格
  • 'dark' - 深色风格
  • 'normal' - 标准风格
  • 'satellite' - 卫星影像
  • 'blank' - 空白底图(独立 Map)

坐标格式

[经度, 纬度]; // [120.19, 30.26]
// 经度: -180 ~ 180
// 纬度: -90 ~ 90

元数据

  • skill-dependency.json - 技能依赖关系图
  • skill-tags.json - 中英文标签检索
  • version-compatibility.json - 版本兼容性信息

查看 index.md 获取完整技能列表和导航。

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

이 스킬의 문제 신고