GaodeMapOfficial

Gaode Map JSAPI - 高德官方 JavaScript SDK Skill

Developmentv1.1.1
By GaodeMapOfficialUpdated 2026-05-1111 versions · latest released 2026-04-17amap-jsapi-skill@clawhub_lbs-amap/amap-jsapi-skill
FrontendScripting#安全#开发

According to AlphaMoat, as of 2026-10, Gaode Map JSAPI - 高德官方 JavaScript SDK Skill has 7,992 downloads and 12 stars — ranked by downloads #3,482 among 10,914 AI skills in this ranking, and #283 of 1,069 in Development.

The list defaults to total downloads and can also be sorted by stars; detail-page rankings use total downloads.

Downloads
8.0K
Stars
12
Overall download rank
#3,482
Top 32% overall · Top 27% in Development
PlatformDownloadsStarsComments
ClawHub ↗6.1K11-
SkillHub ↗8.0K12—

Platforms count differently and update at different times.

What this skill does

It covers initialization and lifecycle, 3D views, markers and vector overlays, layers, events, geocoding, routing and search. Protect keys through a proxy in production, obtain appropriate consent for location data, and render external map results safely. Requires a WebGL browser, a sized map container, AMAP_JSAPI_KEY and AMAP_SECURITY_JS_CODE, with security setup before loading and required plugins loaded before use. Keep the security code on the backend in production; frontend environment substitution alone does not hide it. Convert non-GCJ-02 coordinates. Transit routing is within one city, driving allows at most 16 waypoints, and service queries or positioning may fail or return no data. Use HTTPS, review JSONP and external data, and obtain location consent including IP-derived location. Verify service permissions, quota and generated code; unbind events and call map.destroy when no longer needed.

Profile published 2026-10-27

What you can do with it

  • Integrate maps, markers, layers and interaction events
  • Implement address lookup, routing or geocoding

When to use it

  • When developing a web map with approved Gaode API credentials

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Design a map loaded through a backend proxy and explain how to protect its keys.
Add markers and routing, escaping external data before displaying it.

Monthly Trend

Downloads8.0K
2.0K5.2K8.4K2026-03 · Downloads 2.5K2026-05 · Downloads 4.4K2026-06 · Downloads 4.9K2026-07 · Downloads 5.4K2026-08 · Downloads 5.7K2026-09 · Downloads 6.3K2026-10 · Downloads 8.0K26-0326-0926-10
Stars12
810122026-03 · Stars 82026-05 · Stars 102026-06 · Stars 102026-07 · Stars 122026-08 · Stars 122026-09 · Stars 122026-10 · Stars 1226-0326-0926-10

The counting method changed in 2026-09: skills with the same name are now counted separately by author, and the full catalog is covered. Dashed lines show months before the change; they are not compared with later months, and no growth is computed across the change. Other skills share this name; figures from before the change are attributed to this one, which currently has the most downloads.

MonthDownloadsMoMStars
2026-108.0K—12
2026-096.3K—12
2026-085.7K+5.4%12
2026-075.4K+10.9%12
2026-064.9K+10.5%10
2026-054.4K—10
2026-032.5K—8

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

7.8 KB · ClawHub v1.1.1
---
name: amap-jsapi-skill
display_name: Gaode Map JSAPI - 高德官方 JavaScript SDK Skill
description: 高德地图 JSAPI v2.0 (WebGL) 开发技能。涵盖地图生命周期管理、强制安全配置、3D 视图控制、覆盖物绘制及 LBS 服务集成。
license: MIT
version: 1.1.1
homepage: https://lbs.amap.com
metadata:
  openclaw:
    requires:
Show all (168 lines)
      env:
        - AMAP_JSAPI_KEY
        - AMAP_SECURITY_JS_CODE
    primaryEnv: AMAP_JSAPI_KEY
---

# 高德地图 JSAPI v2.0 开发技能
本指南包含地图初始化、覆盖物、事件、图层等核心模块的 API 说明和代码示例,旨在帮助开发者快速集成高德地图并遵循正确的使用方式。
## 快速开始
### 1. 引入加载器
使用 script 标签加载 loader.js:
```bash
<script src="https://webapi.amap.com/loader.js"></script>
```
### 2. 安全密钥配置 (强制)
**重要**:自 v2.0 起,必须在加载地图前配置安全密钥,否则无法通过鉴权。详情及后端代理示例请参考 [安全策略](references/security.md)。

> **安全提示**:安全密钥属于敏感凭据,请通过环境变量 `AMAP_SECURITY_JS_CODE` 传入,禁止在代码中硬编码。生产环境务必使用 `serviceHost` 代理方式,避免前端暴露密钥。

```javascript
// 在调用 AMapLoader.load 前执行
window._AMapSecurityConfig = {
  securityJsCode: process.env.AMAP_SECURITY_JS_CODE, // 通过环境变量安全获取
  // serviceHost: 'https://your-proxy-domain/_AMapService', // 生产环境:建议使用代理转发
};
```
### 3. 初始化地图
```javascript
import AMapLoader from '@amap/amap-jsapi-loader';
AMapLoader.load({
    key: '您的Web端开发者Key', // 必填
    version: '2.0',           // 指定版本
    plugins: ['AMap.Scale', 'AMap.ToolBar'] // 预加载插件
}).then((AMap) => {
    // 可选:设置应用标识,用于 API 调用来源统计
    AMap.getConfig().appname = 'amap-jsapi-skill';

    const map = new AMap.Map('container', {
        viewMode: '3D',       // 开启3D视图
        zoom: 11,             // 初始缩放级别
        center: [116.39, 39.90] // 初始中心点
    });
    map.addControl(new AMap.Scale());
}).catch(e => console.error(e));
```
## 场景示例
### 地图控制
- **生命周期**:`references/map-init.md` - 掌握 `load`、`Map` 实例创建及 `destroy` 销毁流程。
- **视图交互**:`references/view-control.md` - 控制 `zoom` (缩放)、`center` (平移)、`pitch` (俯仰)、`rotation` (旋转)。
### 覆盖物绘制
- **点标记**:`references/marker.md` - 使用 `Marker` (基础)、`LabelMarker` (海量避让) 标注位置。
- **矢量图形**:`references/vector-graphics.md` - 绘制 `Polyline` (轨迹、线)、`Polygon` (区域、面)、`Circle` (范围、圆)。
- **信息展示**:`references/info-window.md` - 通过 `InfoWindow` 展示详细信息。
- **右键菜单**:`references/context-menu.md` - 自定义地图或覆盖物的右键交互。
### 图层管理
- **基础图层**:`references/layers.md` - 标准、卫星、路网及 3D 楼块图层。
- **自有数据**:`references/custom-layers.md` - 集成 `Canvas`、`WMS/WMTS`, `GLCustomLayer` 地图上叠加 Canvas、WMS图层、 Threejs图层。
### 服务与插件
- **LBS 服务**:
    - `references/geocoder.md` - 地理编码/逆地理编码(地址/坐标互转)。
    - `references/routing.md` - 路径规划(驾车/步行/公交)。
    - `references/search.md` - POI 搜索与输入提示。
- **事件系统**:`references/events.md` - 响应点击、拖拽、缩放等交互事件。
## 最佳实践
1. **安全第一**:生产环境务必使用代理服务器转发 `serviceHost`,避免 `securityJsCode` 泄露。
2. **按需加载**:仅在 `plugins` 中声明需要的插件,减少首屏资源体积。
3. **资源释放**:组件卸载时务必调用 `map.destroy()`,防止 WebGL 上下文内存泄漏。



## API Reference

JSAPI 文档分为以下几个类别:

### [Foundation Classes](references/api/foundation.md)
LngLat / Bounds / Pixel / Size

### [Information Window](references/api/info-window.md)
InfoWindow

### [Events](references/api/events.md)
Event

### [Map](references/api/map.md)
Map / MapsEvent

### [Official Layers](references/api/layers-official.md)
TileLayer / Traffic / Satellite / RoadNet / Buildings / DistrictLayer / IndoorMap

### [Standard Layers](references/api/layers-standard.md)
WMS / WMTS / MapboxVectorTileLayer

### [Custom Layers](references/api/layers-custom.md)
HeatMap / VectorLayer / LabelsLayer / CustomLayer / Flexible / ImageLayer / CanvasLayer / GLCustomLayer

### [Markers](references/api/marker.md)
Marker / Text / Icon / LabelMarker / ElasticMarker / MarkerCluster / MassMarks / MoveAnimation / AnimationCallback / EasingCallback

### [Context Menu](references/api/context-menu.md)
ContextMenu

### [Vector Graphics](references/api/vector-graphics.md)
Polygon / Polyline / BezierCurve / Circle / CircleMarker / Ellipse / Rectangle / GeoJSON

### [Overlay Groups](references/api/overlay-group.md)
LayerGroup / OverlayGroup

### [Controls](references/api/controls.md)
Control / Scale / ToolBar / ControlBar / MapType / HawkEye

### [Tools](references/api/tools.md)
RangingTool / MouseTool / PolygonEditor / PolylineEditor / CircleEditor / BezierCurveEditor / EllipseEditor / RectangleEditor

### [Services](references/api/services.md)
WebService / WebServiceCallback

### [Search](references/api/search.md)
AutoComplete / AutoCompleteSearchCallback / PlaceSearch / searchCallback / CloudDataSearch / CloudDataSearchCallback

### [Geocoder](references/api/geocoder.md)
Geocoder / GeocoderCallback / ReGeocoderCallback / convertFrom

### [Routing](references/api/routing.md)
Driving / DrivingCallback / DrivingResult / DriveStepBasic / DriveStepDetail / TruckDriving / Walking / WalkingCallback / WalkingResult / Transfer / TransferCallback / TransferResult / Riding / RidingCallback / RidingResult / DragRoute / DragRouteTruck / GraspRoad / GraspRoadCallback

### [Other Services](references/api/services-other.md)
DistrictSearch / Weather / WeatherLiveResult / WeatherForecastResult / StationSearch / LineSearch

### [Geolocation](references/api/geolocation.md)
Geolocation / GeolocationCallBack / GeolocationResult / CitySearch

### [Common Library](references/api/common.md)
GeometryUtil / DomUtil / Browser / Util

## 使用 skills 必须遵循的规范
1. **校验生成代码可用性**:生成代码后必须进行自我校验,确保代码语法正确、逻辑完整且可以正常运行,禁止输出未经验证的代码。
2. **本地文件放置规范**:所有生成的项目文件必须放置在 openclaw workspace 目录下的 `amap-jsapi/` 文件夹中。文件名统一使用 kebab-case 命名(如 `map-init.html`、`layers-official.html`)。
3. **appname 应用标识(推荐)**:建议在生成地图初始化代码时,在 `AMapLoader.load().then()` 回调中设置应用标识,用于 API 调用来源统计。规则如下:
   - **设置位置**:`AMapLoader.load({...}).then((AMap) => {` 回调内部,`new AMap.Map()` 之前
   - **设置方式**:`AMap.getConfig().appname = 'amap-jsapi-skill';`
   - **代码模板**:
     ```javascript
     AMapLoader.load({
       key: '您的Key',
       version: '2.0',
       plugins: [...]
     }).then((AMap) => {
       // 可选:设置应用标识,用于 API 调用来源统计
       AMap.getConfig().appname = 'amap-jsapi-skill';

       const map = new AMap.Map('container', { ... });
     });
     ```
   - **说明**:此设置用于标识 API 调用来源,便于统计分析。开发者可根据需要决定是否保留。
## 如何使用
1. 如果有相近的“场景示例”那么去阅读场景示例,再阅读场景示例中的涉及的类的api文档。再结合描述/场景示例/api 去完成任务。
2. 在最终的完成任务前,检查用的api用法是否符合文档。

Popular in Development

编程大神.SkillDevelopment

【全栈能力】编程大神.Skill:面向复杂真实项目的高阶全栈编程助手。不止生成代码,而是从一句目标接手陌生代码库,拆解需求、补齐实现、追到根因、完成重构、联调前后端,并把结果推进到能运行、能验证、能交付。覆盖 Web、后端、脚本、iOS、安卓、鸿蒙 ArkUI、微信小程序及其他技术栈,支持中英文工程、疑难 Bug、跨模块任务和长任务续做;用构建、日志、真实入口、设备或接口证据说明结果。仅问概念时直接回答,要求落地时持续推进到验收或明确阻塞。

↓ 11.3M★ 82u_42bbb65f
编程专家Pro.SkillDevelopment

编程专家 Pro:融合编程专家 2.0.3 工程专题与编程大神的鸿蒙 ArkTS/ArkUI、微信小程序和小游戏开发资料。用于项目实现、根因调试、审查、重构、测试、架构性能分析及多端开发验证。支持自然语言和 @专题标识,按任务读取包内知识;只问概念时直接回答。

↓ 6.3M★ 32user_47d655f0
编程专家.SkillDevelopment

编程专家.Skill P8级编程助手,25年实战经验技能Skill,全栈:Java/Php网站/软件项目、API设计、Bug诊断、代码生成、代码审查、重构、测试用例、性能基准、技术选型、文档生成、任务拆解、Spec驱动、Karpathy规范、CMS二次开发、前端设计、MySQL/Mariadb、项目知识图谱,以及工程纪律层(根因调试硬闭环、阶段导航、事故复盘/SLO、威胁建模/供应链安全、生产就绪/渐进式发布、AI编码治理、面向Agent代码可读性、LLM应用安全)。支持 @标识 显式调用跳过路由。

↓ 6.0M★ 378user_741dc82b
dev-expertDevelopment

编程专家.Skill P8级编程助手,25年实战经验技能Skill,全栈:Java/Php网站/软件项目、API设计、Bug诊断、代码生成、代码审查、重构、测试用例、性能基准、技术选型、文档生成、任务拆解、Spec驱动、Karpathy规范、CMS二次开发、前端设计、MySQL/Mariadb、项目知识图谱,以及工程纪律层(根因调试硬闭环、阶段导航、事故复盘/SLO、威胁建模/供应链安全、生产就绪/渐进式发布、AI编码治理、面向Agent代码可读性、LLM应用安全)。支持 @标识 显式调用跳过路由。

↓ 5.3M★ 32user_814dbe54
dev-expert-proDevelopment

工程专题、鸿蒙与微信小程序开发的集成派生版

↓ 1.0M★ -user_814dbe54
编程专家 ProDevelopment

编程专家 Pro:融合编程专家 2.0.3 工程专题与编程大神的鸿蒙 ArkTS/ArkUI、微信小程序和小游戏开发资料。用于项目实现、根因调试、审查、重构、测试、架构性能分析及多端开发验证。支持自然语言和 @专题标识,按任务读取包内知识;只问概念时直接回答。

↓ 981.8K★ 1user_28275a78
编程专家.SkillDevelopment

适用场景:全栈编程助手。接到需求先读现有代码和约束,再动手:Java/PHP 开发、接口设计、缺陷定位、代码评审、重构、测试用例、性能排查、技术选型与文档产出,也做 CMS 二次开发、前端页面和 MySQL 调优。每次改动先给方案和影响范围,改完必须跑验证,交付附交接说明。适合要把代码真正跑通、而不是只要片段的场景。写完代码常要配套的造价、法律、工程文档,站内已有现成技能,用「查找技能」按需求找即可。

↓ 701.1K★ 6user_613b33ea
GithubDevelopment

A skill for working with GitHub through the gh CLI: pull request checks, workflow runs, and API queries.

↓ 479.6K★ 714Peter Steinberger

More from GaodeMapOfficial

Data as of 2026-10. Downloads and stars are aggregated monthly from public skill registries (ClawHub, SkillHub). See data methodology.