amap-lbs-skill

by AMap-WebVerified

适用于openclaw平台的高德地图综合服务,支持POI搜索、路径规划、旅游规划、周边搜索和热力图数据可视化

27
Stars
3
Forks
JavaScript
Language
8/24/2026
Added
View on GitHubDownload ZIP

⚠️ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/AMap-Web/amap-lbs-skill

Getting Started

Guides for using skills like amap-lbs-skill.

Security Report

Verified

Last scanned: —

{
  "status": "PASSED",
  "issues": []
}

README.md

高德地图综合服务 Skill

高德地图综合服务向开发者提供完整的地图数据服务,包括地点搜索、路径规划、旅游规划和数据可视化等功能。

功能特性

  • ✅ 自动管理高德 Web Service Key

  • ✅ POI 搜索功能

  • ✅ 路径规划(步行、驾车、骑行、公交)

  • ✅ 智能旅游规划助手

  • ✅ 地图可视化链接生成

  • ✅ 热力图数据可视化

  • ✅ 支持命令行脚本执行

  • ✅ 配置本地持久化

安装依赖

npm install

配置 API Key

首次使用需要配置高德 Web Service Key:

# 方式1: 运行时通过环境变量
export AMAP_WEBSERVICE_KEY=your_key
node scripts/poi-search.js --keywords=肯德基 --city=北京

# 方式2: 运行时自动提示输入(会保存到 config.json)
node scripts/poi-search.js --keywords=肯德基 --city=北京

# 方式3: 手动创建配置文件
cp config.example.json config.json
# 然后编辑 config.json 填入你的 Key

获取 API Key:访问 高德开放平台 创建应用并获取 Key

使用方法

1. POI 搜索

# 基础搜索
node scripts/poi-search.js --keywords=肯德基 --city=北京

# 带更多参数的搜索
node scripts/poi-search.js --keywords=餐厅 --city=上海 --page=1 --offset=20

# 周边搜索(需要提供中心点坐标和半径)
node scripts/poi-search.js --keywords=酒店 --location=116.397428,39.90923 --radius=1000

2. 路径规划

# 步行路线
node scripts/route-planning.js --type=walking --origin=116.397428,39.90923 --destination=116.427281,39.903719

# 驾车路线(带途经点)
node scripts/route-planning.js --type=driving --origin=116.397428,39.90923 --destination=116.427281,39.903719 --waypoints=116.410000,39.910000

# 骑行路线
node scripts/route-planning.js --type=riding --origin=116.397428,39.90923 --destination=116.427281,39.903719

# 公交路线
node scripts/route-planning.js --type=transfer --origin=116.397428,39.90923 --destination=116.427281,39.903719 --city=北京

3. 智能旅游规划

# 基础旅游规划
node scripts/travel-planner.js --city=北京 --interests=景点,美食,酒店

# 指定路线类型
node scripts/travel-planner.js --city=杭州 --interests=西湖,美食,茶馆 --routeType=walking

# 驾车游览
node scripts/travel-planner.js --city=上海 --interests=外滩,南京路,城隍庙 --routeType=driving

4. 在代码中使用

const { 
  searchPOI, 
  walkingRoute, 
  drivingRoute, 
  travelPlanner,
  generateMapLink 
} = require('./index');

// POI 搜索
async function searchExample() {
  const result = await searchPOI({
    keywords: '肯德基',
    city: '北京',
    page: 1,
    offset: 10
  });
  console.log(result);
}

// 步行路线规划
async function routeExample() {
  const result = await walkingRoute({
    origin: '116.397428,39.90923',
    destination: '116.427281,39.903719'
  });
  console.log(result);
}

// 旅游规划
async function travelExample() {
  const result = await travelPlanner({
    city: '北京',
    interests: ['景点', '美食', '酒店'],
    routeType: 'walking'
  });
  console.log(result.mapLink); // 地图可视化链接
}

// 生成地图链接
function mapLinkExample() {
  const mapData = [
    { 
      type: 'poi', 
      lnglat: [116.397428, 39.90923], 
      sort: '风景名胜', 
      text: '故宫博物院', 
      remark: '明清两代的皇家宫殿' 
    },
    {
      type: 'route',
      routeType: 'walking',
      start: [116.397428, 39.90923],
      end: [116.427281, 39.903719],
      remark: '步行路线'
    }
  ];
  
  const link = generateMapLink(mapData);
  console.log(link);
}

API 参数说明

POI 搜索参数

参数 类型 必填 说明

keywords string 是 查询关键字

city string 否 城市名称或城市编码

types string 否 POI类型编码,多个用|分隔

location string 否 中心点坐标(经度,纬度)

radius number 否 搜索半径,单位:米

page number 否 当前页数,默认1

offset number 否 每页记录数,默认10,最大25

路径规划参数

步行路线 (walkingRoute)

参数 类型 必填 说明

origin string 是 起点坐标 "经度,纬度"

destination string 是 终点坐标 "经度,纬度"

驾车路线 (drivingRoute)

参数 类型 必填 说明

origin string 是 起点坐标 "经度,纬度"

destination string 是 终点坐标 "经度,纬度"

waypoints string 否 途经点,多个用;分隔,最多16个

strategy number 否 驾车策略,默认10(躲避拥堵)

骑行路线 (ridingRoute)

参数 类型 必填 说明

origin string 是 起点坐标 "经度,纬度"

destination string 是 终点坐标 "经度,纬度"

公交路线 (transitRoute)

参数 类型 必填 说明

origin string 是 起点坐标 "经度,纬度"

destination string 是 终点坐标 "经度,纬度"

city string 是 城市名称或城市编码

strategy number 否 公交策略,0-5,默认0(最快捷)

nightflag boolean 否 是否计算夜班车,默认false

旅游规划参数 (travelPlanner)

参数 类型 必填 说明

city string 是 城市名称

interests array 否 兴趣点关键词数组,默认['景点','美食']

routeType string 否 路线类型:walking/driving/riding/transfer,默认walking

项目结构

jsapi-skills/
├── index.js                    # 主入口文件,包含核心功能
├── scripts/
│   ├── poi-search.js           # POI 搜索脚本
│   ├── route-planning.js       # 路径规划脚本
│   └── travel-planner.js       # 智能旅游规划脚本
├── config.json                 # 配置文件(自动生成,不要提交)
├── config.example.json         # 配置示例
├── package.json                # 依赖配置
├── .gitignore                  # Git 忽略配置
├── SKILL.md                    # OpenClaw Skill 描述文件
└── README.md                   # 本文件

地图可视化

所有规划结果都会生成地图可视化链接,格式如下:

https://a.amap.com/jsapi_demo_show/static/openclaw/travel_plan.html?data=<encoded_json_data>

数据格式符合 MapTaskData 接口规范,支持:

  • POI 任务:展示兴趣点位置和信息

  • 路线任务:展示路径规划结果

示例数据结构:

[
  // POI 兴趣点
  { 
    type: 'poi', 
    lnglat: [116.397428, 39.90923], 
    sort: '风景名胜', 
    text: '故宫博物院', 
    remark: '明清两代的皇家宫殿,旧称紫禁城。' 
  },
  // 路线规划
  {
    type: 'route',
    routeType: 'walking',
    start: [116.397428, 39.90923],
    end: [116.427281, 39.903719],
    remark: '步行路线'
  }
]

注意事项

  • 请妥善保管你的 Web Service Key,不要提交到公开仓库

  • config.json 已在 .gitignore 中,不会被提交

  • 高德 Web 服务 API 有调用频率限制,请合理使用

  • 免费用户每日调用量有限制,具体请查看高德开放平台说明

相关链接

License

MIT

Frequently Asked Questions

What is amap-lbs-skill?

amap-lbs-skill is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by AMap-Web. 适用于openclaw平台的高德地图综合服务,支持POI搜索、路径规划、旅游规划、周边搜索和热力图数据可视化. It has 27 GitHub stars.

Is amap-lbs-skill safe to use?

Yes. amap-lbs-skill passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install amap-lbs-skill?

Clone the repository with "git clone https://github.com/AMap-Web/amap-lbs-skill" and add it to your Claude Code skills directory (see the Installation section above). amap-lbs-skill ships a SKILL.md manifest, so compatible agents can discover and load it automatically.

What programming language is amap-lbs-skill written in?

amap-lbs-skill is primarily written in JavaScript. It is open-source under AMap-Web on GitHub, so you can review or fork the full source.

Are there alternatives to amap-lbs-skill?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh amap-lbs-skill against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI Agents
View details

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details