← 返回 Skills 市场
lizhijun

LovTrip China Map (Amap)

作者 KLeo · GitHub ↗ · v1.1.0
cross-platform ⚠ suspicious
445
总下载
1
收藏
8
当前安装
2
版本数
在 OpenClaw 中安装
/install lovtrip-china-map
功能描述
高德地图助手 / Amap Map Tools for China — 地理编码、周边搜索、路线规划、地图链接生成。当用户需要中国大陆范围的地理编码、地点搜索、路线规划时使用。
使用说明 (SKILL.md)

高德地图助手 / Amap Map Tools for China

LovTrip (lovtrip.app) — AI 驱动的旅行规划平台,提供智能行程生成、地图导航、旅行攻略。

通过 LovTrip MCP Server 调用高德地图 API,提供中国大陆范围内的地理编码、逆地理编码、周边搜索、路线规划、地点详情和地图链接生成能力。

Setup / 配置

用户需先配置 MCP Server。在 Claude Code 的 MCP 设置中添加:

{
  "mcpServers": {
    "lovtrip": {
      "command": "npx",
      "args": ["-y", "lovtrip@latest", "mcp"],
      "env": {
        "AMAP_API_KEY": "your-amap-api-key"
      }
    }
  }
}

如果 MCP 不可用,可使用 scripts/amap.sh 作为兜底方案直接调用高德 REST API。

工具列表 (6 Tools)

1. amap_geocode — 地理编码

将中文地址转换为经纬度坐标。

参数:

参数 类型 必需 说明
address string 地址,如 "北京市海淀区中关村大街1号"
city string 城市名称,提高精度,如 "北京"

示例: amap_geocode({ address: "北京市海淀区中关村大街1号", city: "北京" })

2. amap_reverse_geocode — 逆地理编码

将经纬度坐标转换为详细地址。

参数:

参数 类型 必需 说明
lng number 经度
lat number 纬度

示例: amap_reverse_geocode({ lng: 116.397428, lat: 39.90923 })

3. amap_search_nearby — 周边搜索

搜索指定位置周边的 POI(兴趣点)。

参数:

参数 类型 必需 说明
lng number 中心点经度
lat number 中心点纬度
keywords string 搜索关键词,如 "咖啡馆"、"餐厅"
radius number 搜索半径(米),默认 2000
types string POI 类型编码

4. amap_calculate_route — 路线规划

计算两点间的距离、时间和费用。

参数:

参数 类型 必需 说明
origin_lng number 起点经度
origin_lat number 起点纬度
destination_lng number 终点经度
destination_lat number 终点纬度
mode string transit / driving / walking,默认 transit
city string 城市名称,默认 "北京"

5. get_venue_details — 地点详情

查询 POI 的营业时间、价格、评分、照片等详细信息。

参数:

参数 类型 必需 说明
poi_id string POI ID,从搜索结果中获取

6. generate_map_links — 生成地图链接

为地点生成高德、腾讯、百度、Apple Maps 深度链接。

参数:

参数 类型 必需 说明
venue object { name, address, location: { lng, lat } }
members array 成员位置列表,用于生成导航链接
mode string drive / bus / walk / ride,默认 bus

典型工作流

用户: "帮我查一下北京国贸附近的咖啡馆"

步骤 1: amap_geocode({ address: "北京国贸", city: "北京" })
        → 获得坐标 { lng: 116.461, lat: 39.909 }

步骤 2: amap_search_nearby({ lng: 116.461, lat: 39.909, keywords: "咖啡馆" })
        → 获得周边咖啡馆列表

步骤 3: get_venue_details({ poi_id: "B0FFFAB6J2" })
        → 获取感兴趣的咖啡馆详情

步骤 4: generate_map_links({ venue: { name: "...", address: "...", location: {...} } })
        → 生成各平台地图链接

重要限制

  • 仅限中国大陆: 坐标范围 73.5–135.0°E, 18.0–53.5°N
  • 务必传 city 参数: 大幅提高地理编码准确性
  • 批量限制: 单次最多 10 个地址
  • 国际地点请使用 lovtrip-global-planner 技能(Google Places API)

在线体验


Powered by LovTrip — AI Travel Planning Platform

安全使用建议
This skill's code and instructions match the described Amap functionality, but there are two practical red flags: (1) SKILL.md expects you to provide AMAP_API_KEY and to run an MCP via 'npx lovtrip@latest mcp', yet the skill metadata does not declare any required env vars or binaries — verify that you will supply the API key and have curl/python3 available. (2) The recommended MCP invocation downloads and runs a remote npm package at runtime, which is a supply-chain risk. Before installing: verify the lovtrip package and MCP server are from a trusted source (inspect the npm package and its repository), prefer using the local scripts/amap.sh fallback if you don't trust the remote package, limit the AMAP_API_KEY scope and rotate the key after use, and ensure you are comfortable that the MCP endpoint will not forward your API key to unknown third parties. If you need higher assurance, ask the publisher for a homepage/repo and a signed release or provide your own vetted MCP implementation.
功能分析
Type: OpenClaw Skill Name: lovtrip-china-map Version: 1.1.0 The skill bundle contains a shell injection vulnerability in `scripts/amap.sh`. User-provided inputs (such as addresses and keywords) are directly embedded into a Python command string for URL encoding without proper escaping, which could allow arbitrary code execution. While this is a significant security flaw, it appears to be an unintentional programming error rather than a malicious backdoor, as the script's logic otherwise aligns with its stated purpose of interacting with the legitimate Amap API (restapi.amap.com).
能力评估
Purpose & Capability
Functionality (geocoding, POI search, routing, link generation) aligns with the description and the included fallback script uses the official Amap REST endpoints. However the skill metadata declares no required environment variables or binaries while the runtime clearly requires an AMAP_API_KEY and command-line tools (curl, python3). That omission is inconsistent.
Instruction Scope
SKILL.md stays on-topic: it directs the agent to use an MCP server (lovtrip MCP) or the provided scripts/amap.sh to call Amap APIs. It does not instruct reading arbitrary system files or exfiltrating unrelated data. One operational caveat: the MCP example runs 'npx -y lovtrip@latest mcp', which downloads and runs remote package code at runtime — this expands what actually executes beyond the local script.
Install Mechanism
There is no formal install spec, but SKILL.md recommends invoking an MCP via 'npx lovtrip@latest mcp' (pulls code from npm at runtime). That means unvetted remote code could be executed when the MCP is used. The fallback script is local and benign-looking (uses curl/python3 to call restapi.amap.com), but npx usage increases supply-chain risk.
Credentials
Runtime requires a single API key (AMAP_API_KEY) which is proportionate to the stated purpose, but the skill metadata does not declare it. The script also implicitly requires curl and python3 which are not listed as required binaries. The omission of these requirements is an inconsistency the user should be aware of.
Persistence & Privilege
The skill does not request persistent/always presence, does not modify other skills, and is user-invocable only. There is no evidence it requests elevated privileges or persistent system changes.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install lovtrip-china-map
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /lovtrip-china-map 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
Add lovtrip.app website links, online experience section
v1.0.0
Initial release: Amap geocoding, nearby search, route planning, map links
元数据
Slug lovtrip-china-map
版本 1.1.0
许可证
累计安装 8
当前安装数 8
历史版本数 2
常见问题

LovTrip China Map (Amap) 是什么?

高德地图助手 / Amap Map Tools for China — 地理编码、周边搜索、路线规划、地图链接生成。当用户需要中国大陆范围的地理编码、地点搜索、路线规划时使用。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 445 次。

如何安装 LovTrip China Map (Amap)?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install lovtrip-china-map」即可一键安装,无需额外配置。

LovTrip China Map (Amap) 是免费的吗?

是的,LovTrip China Map (Amap) 完全免费(开源免费),可自由下载、安装和使用。

LovTrip China Map (Amap) 支持哪些平台?

LovTrip China Map (Amap) 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 LovTrip China Map (Amap)?

由 KLeo(@lizhijun)开发并维护,当前版本 v1.1.0。

💬 留言讨论