← Back to Skills Marketplace
aaronjager92

amapgeo

by aaronjager92 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
88
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install amap-geoservice
Description
提供基于高德开放平台的地理编码、逆地理编码、POI搜索、路径规划及距离测量的地理信息服务。
README (SKILL.md)

高德开放平台地理信息服务

🤖 支持平台:飞书 / 微信(文字)

地理编码、POI搜索、路径规划、导航距离等地理信息服务


⚠️ 首次使用必读

使用前必须配置高德开放平台 API Key,否则无法运行!

配置方式:

  1. 获取 Key:https://console.amap.com/dev/key/app
  2. 设置环境变量:export AMAP_API_KEY="your-key"AMAP_SECRET_KEY="your-secret"(如需签名)
  3. 或创建配置文件:cp config.example.txt config.txt 并填入 Key
  4. 验证:python3 scripts/amap_geo.py --action geo --address "北京市朝阳区"

详见下方「首次使用配置」章节。


功能

当用户询问以下内容时,自动调用高德地理信息 API:

  1. 地理编码:地址 → 经纬度
  2. 逆地理编码:经纬度 → 地址
  3. POI搜索:搜索地点、周边检索
  4. 路径规划:步行/驾车/公交路线
  5. 距离测量:两点间距离

触发方式

用户发送以下任一方式都会触发:

  • 北京市朝阳区的经纬度
  • 附近有什么医院
  • 从国贸到中关村怎么走
  • 北京到上海多远
  • 搜索附近的餐厅
  • 定位一下

首次使用配置

1. 获取高德 API Key

  1. 注册高德开放平台:https://console.amap.com/dev/key/app
  2. 创建应用,获取 Web服务 API Key
  3. 配置签名密钥(可选,用于高级功能)

2. 关于数字签名

高德部分 API 需要数字签名验证

签名算法:MD5(key + params + secret) → 32位小写MD5值

步骤:
1. 将所有请求参数(除sign外)按key字母顺序排序
2. 拼接为:key1value1key2value2...
3. 在拼接字符串前加上 API Key,末尾加上 SecretKey
4. 对整个字符串计算 MD5

是否需要签名?

  • 基础服务(地理编码、POI搜索):只需 API Key
  • 高级服务(路径规划等):需要签名
  • 脚本会自动判断并添加签名

3. 配置方式

方式一:环境变量(推荐)

export AMAP_API_KEY="your-api-key"
export AMAP_SECRET_KEY="your-secret-key"  # 如需签名

方式二:配置文件

cp config.example.txt config.txt
# 编辑 config.txt,填入你的 Key

4. 验证

# 地理编码
python3 scripts/amap_geo.py --action geo --address "北京市朝阳区"

# POI搜索
python3 scripts/amap_geo.py --action poi --keywords "餐厅" --city "北京"

# 路径规划
python3 scripts/amap_geo.py --action direction --from "116.4074,39.9042" --to "116.4274,39.9042"

使用方式

命令行参数

# 地理编码(地址→坐标)
python3 scripts/amap_geo.py --action geo --address "北京市朝阳区"

# 逆地理编码(坐标→地址)
python3 scripts/amap_geo.py --action regeo --location "116.4074,39.9042"

# POI搜索
python3 scripts/amap_geo.py --action poi --keywords "餐厅" --city "北京"

# 周边搜索
python3 scripts/amap_geo.py --action around --location "116.4074,39.9042" --keywords "银行"

# 路径规划(驾车)
python3 scripts/amap_geo.py --action direction --from "116.4074,39.9042" --to "116.4274,39.9042"

# 距离测量
python3 scripts/amap_geo.py --action distance --from "116.4074,39.9042" --to "116.4274,39.9042"

返回格式

输出格式化文本,便于阅读。


技术细节

API 端点

功能 端点 说明
地理编码 /v3/geocode/geo 地址→坐标
逆地理编码 /v3/geocode/regeo 坐标→地址
POI搜索 /v3/place/text 关键字搜索
周边搜索 /v3/place/around 圆形区域搜索
驾车路径 /v3/direction/driving 驾车路线
步行路径 /v3/direction/walking 步行路线
公交路径 /v3/direction/transit 公交路线
距离测量 /v3/direction/material 直线距离

签名算法

签名 = MD5(api_key + sorted_params + secret_key)

文件结构

amap_geoservice/
├── SKILL.md              # 本文件
├── config.example.txt    # 配置示例
├── scripts/           # 脚本目录
│   └── amap_geo.py    # 主脚本
└── references/        # 参考文档
    └── README.md        # 详细说明

常见问题

Q: 提示"签名错误"

A: 检查 SecretKey 是否正确配置

Q: 提示"服务无效"

A: 检查 API Key 类型是否为 Web服务,且已开通对应服务

Q: POI搜索无结果

A: 尝试更精确的关键字,或使用城市adcode限定范围


常用城市 AdCode

城市 AdCode
北京 110000
上海 310000
广州 440100
深圳 440300
成都 510100
武汉 420100
杭州 330100

贡献

欢迎提交 Issue 和 PR!

Usage Guidance
This package appears to implement Amap geocoding/POI/directions and requires you to provide an AMAP_API_KEY (and optionally AMAP_SECRET_KEY) plus Python and the 'requests' package. The immediate red flag is that the registry metadata lists no required env vars or binaries while the included SKILL.md and script clearly require them — that mismatch reduces transparency. Before installing: (1) confirm the skill author/source since homepage is missing, (2) verify you are comfortable providing an Amap API key (it grants the skill ability to make API calls under your quota), (3) review the included scripts yourself or run them in an isolated environment, and (4) ask the publisher to correct the registry metadata to declare the required env vars and runtime (python + requests). If you lack the ability to audit code, prefer not to install from unknown sources or run under restricted credentials and network isolation.
Capability Analysis
Type: OpenClaw Skill Name: amap-geoservice Version: 1.0.0 The amap-geoservice skill provides geographic information services such as geocoding, POI search, and route planning using the Amap (高德) Open Platform API. The core logic in `scripts/amap_geo.py` is well-structured, using the `requests` library to interact with official API endpoints and implementing the required MD5 signing algorithm for authenticated requests. There is no evidence of malicious behavior, data exfiltration, or prompt injection; the script only accesses the specific environment variables or configuration files (`config.txt`) necessary for its stated purpose.
Capability Assessment
Purpose & Capability
The skill's stated purpose (高德地图地理服务) matches the code and SKILL.md: it calls Amap endpoints for geocoding, POI, directions, distance, etc. However the registry metadata claims no required environment variables or credentials while both SKILL.md, config.example.txt and scripts/amap_geo.py require AMAP_API_KEY (and optionally AMAP_SECRET_KEY). That metadata omission is disproportionate and inconsistent.
Instruction Scope
The runtime instructions are narrowly scoped to configuring an Amap API key/secret, optionally copying config.txt, and running the included Python script which queries only restapi.amap.com endpoints. The instructions do not ask the agent to read unrelated system paths or exfiltrate data. They do require setting environment variables or a local config file.
Install Mechanism
There is no install spec in the registry (instruction-only), but the package actually contains a Python script that requires 'requests' and a Python interpreter. The skill suggests 'pip install requests' but the metadata does not declare Python or pip as required binaries. This gap is a packaging/metadata inconsistency (not direct malicious download activity).
Credentials
The code legitimately needs AMAP_API_KEY and may use AMAP_SECRET_KEY for signatures. Those are reasonable and minimal for the stated purpose, but the skill metadata declares no required env vars/primary credential — the missing declaration reduces transparency. No unrelated credentials are requested.
Persistence & Privilege
The skill does not request always:true, does not attempt to modify other skills or system-wide settings, and does not persist credentials beyond reading a local config file or environment variables. No special platform privileges are requested.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install amap-geoservice
  3. After installation, invoke the skill by name or use /amap-geoservice
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
amap-geoservice 1.0.0 – 首个版本发布 - 提供高德开放平台地理信息服务能力,包括地理编码、逆地理编码、POI/周边搜索、路径规划、距离测量等 - 支持命令行脚本,便于参数化调用和自动化处理 - 配置灵活:支持环境变量或配置文件方式管理 API Key/Secret - 自动判断是否需要数字签名并处理,兼容基础和高级 API - 附详细使用文档及常见问题解答
Metadata
Slug amap-geoservice
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is amapgeo?

提供基于高德开放平台的地理编码、逆地理编码、POI搜索、路径规划及距离测量的地理信息服务。 It is an AI Agent Skill for Claude Code / OpenClaw, with 88 downloads so far.

How do I install amapgeo?

Run "/install amap-geoservice" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is amapgeo free?

Yes, amapgeo is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does amapgeo support?

amapgeo is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created amapgeo?

It is built and maintained by aaronjager92 (@aaronjager92); the current version is v1.0.0.

💬 Comments