amap-jsapi-skill
高德地图 JSAPI v2.0 (WebGL) 开发技能。涵盖地图生命周期管理、强制安全配置、3D 视图控制、覆盖物绘制及 LBS 服务集成。
Skill by m4d3bug
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/m4d3bug-amap-jsapi-skill
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/amap-jsapi-skill
What's inside
- Skill name
amap-jsapi-skill- Description
- 高德地图 JSAPI v2.0 (WebGL) 开发技能。涵盖地图生命周期管理、强制安全配置、3D 视图控制、覆盖物绘制及 LBS 服务集成。
- License
- MIT
- Instructions
- 129 lines in SKILL.md · view on GitHub
Files (35)
- SKILL.md
- _meta.json
- common.md · references/api/
- context-menu.md · references/api/
- controls.md · references/api/
- events.md · references/api/
- foundation.md · references/api/
- geocoder.md · references/api/
- geolocation.md · references/api/
- info-window.md · references/api/
- layers-custom.md · references/api/
- layers-official.md · references/api/
- layers-standard.md · references/api/
- map.md · references/api/
- marker.md · references/api/
- overlay-group.md · references/api/
- routing.md · references/api/
- search.md · references/api/
- services-other.md · references/api/
- services.md · references/api/
- tools.md · references/api/
- vector-graphics.md · references/api/
- context-menu.md · references/
- custom-layers.md · references/
- events.md · references/
- geocoder.md · references/
- info-window.md · references/
- layers.md · references/
- map-init.md · references/
- marker.md · references/
- routing.md · references/
- search.md · references/
- security.md · references/
- vector-graphics.md · references/
- view-control.md · references/
SKILL.md (first lines)
# 高德地图 JSAPI v2.0 开发技能
本指南包含地图初始化、覆盖物、事件、图层等核心模块的 API 说明和代码示例,旨在帮助开发者快速集成高德地图并遵循正确的使用方式。
## 快速开始
### 1. 引入加载器
使用 script 标签加载 loader.js:
```bash
<script src="https://webapi.amap.com/loader.js"></script>
```
### 2. 安全密钥配置 (强制)
**重要**:自 v2.0 起,必须在加载地图前配置安全密钥,否则无法通过鉴权。详情及后端代理示例请参考 [安全策略](references/security.md)。
```javascript
// 在调用 AMapLoader.load 前执行
window._AMapSecurityConfig = {
securityJsCode: '您的安全密钥', // 开发环境:明文设置
// 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) => {
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)From m4d3bug/oh-my-openclaw, MIT.
More from m4d3bug/oh-my-openclaw
- 0.443score
agent-wal
m4d3bug
Write-Ahead Log protocol for agent state persistence.
SkillDFreshness: D★ 2Claude Code +9 - 0.439score
wake-state
m4d3bug
Persist agent state across crashes, context deaths, and restarts.
SkillDFreshness: D★ 2Claude Code +9 - 0.439score
skill-scanner
m4d3bug
Scan OpenClaw skills for security vulnerabilities before installing them.
SkillDFreshness: D★ 2Claude Code +9 - 0.438score
copywriting
m4d3bug
Write persuasive copy for landing pages, emails, ads, sales pages, and marketing materials.
SkillDFreshness: D★ 2Claude Code +9 - 0.438score
agent-weave
m4d3bug
Master-Worker Agent Cluster for parallel task execution.
SkillDFreshness: D★ 2Claude Code +9 - 0.438score
content-strategy
m4d3bug
Build and execute a content marketing strategy for a solopreneur business.
SkillDFreshness: D★ 2Claude Code +9 - 0.438score
better-ralph
m4d3bug
Run one Better Ralph iteration: PRD-driven autonomous coding.
SkillDFreshness: D★ 2Claude Code +9 - 0.438score
cli-anything
m4d3bug
Use when the user wants OpenClaw to build, refine, test, or validate a CLI-Anything harness for a GUI application or source repository.
SkillDFreshness: D★ 2Claude Code +9 - 0.434score
agent-sentinel
m4d3bug
The operational circuit breaker for this agent.
SkillDFreshness: D★ 2Claude Code +9 - 0.433score
amap-lbs-skill
m4d3bug
高德地图综合服务,支持POI搜索、路径规划、旅游规划、周边搜索和热力图数据可视化
SkillDFreshness: D★ 2Claude Code +9 - 0.428score
cicd-pipeline
m4d3bug
Create, debug, and manage CI/CD pipelines with GitHub Actions.
SkillDFreshness: D★ 2Claude Code +9
Signals
- Stars
- 2
- Forks
- 1
- Open issues
- 2
- Last commit (this folder)
- Mar 18, 2026 (7 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/m4d3bug/oh-my-openclaw
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from m4d3bug
- 0.443score
agent-wal
m4d3bug
Write-Ahead Log protocol for agent state persistence.
SkillDFreshness: D★ 2Claude Code +9 - 0.439score
wake-state
m4d3bug
Persist agent state across crashes, context deaths, and restarts.
SkillDFreshness: D★ 2Claude Code +9 - 0.439score
skill-scanner
m4d3bug
Scan OpenClaw skills for security vulnerabilities before installing them.
SkillDFreshness: D★ 2Claude Code +9 - 0.438score
copywriting
m4d3bug
Write persuasive copy for landing pages, emails, ads, sales pages, and marketing materials.
SkillDFreshness: D★ 2Claude Code +9 - 0.438score
agent-weave
m4d3bug
Master-Worker Agent Cluster for parallel task execution.
SkillDFreshness: D★ 2Claude Code +9 - 0.438score
content-strategy
m4d3bug
Build and execute a content marketing strategy for a solopreneur business.
SkillDFreshness: D★ 2Claude Code +9
Cite this page
amap-jsapi-skill. Agent Mart. https://agentmart.dev/skills/m4d3bug-amap-jsapi-skill (last updated 2026-10-24)