← Back to Skills Marketplace
lizhijun

LovTrip China Map (Amap)

by KLeo · GitHub ↗ · v1.1.0
cross-platform ⚠ suspicious
445
Downloads
1
Stars
8
Active Installs
2
Versions
Install in OpenClaw
/install lovtrip-china-map
Description
高德地图助手 / Amap Map Tools for China — 地理编码、周边搜索、路线规划、地图链接生成。当用户需要中国大陆范围的地理编码、地点搜索、路线规划时使用。
README (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

Usage Guidance
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.
Capability Analysis
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).
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install lovtrip-china-map
  3. After installation, invoke the skill by name or use /lovtrip-china-map
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.0
Add lovtrip.app website links, online experience section
v1.0.0
Initial release: Amap geocoding, nearby search, route planning, map links
Metadata
Slug lovtrip-china-map
Version 1.1.0
License
All-time Installs 8
Active Installs 8
Total Versions 2
Frequently Asked Questions

What is LovTrip China Map (Amap)?

高德地图助手 / Amap Map Tools for China — 地理编码、周边搜索、路线规划、地图链接生成。当用户需要中国大陆范围的地理编码、地点搜索、路线规划时使用。 It is an AI Agent Skill for Claude Code / OpenClaw, with 445 downloads so far.

How do I install LovTrip China Map (Amap)?

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

Is LovTrip China Map (Amap) free?

Yes, LovTrip China Map (Amap) is completely free (open-source). You can download, install and use it at no cost.

Which platforms does LovTrip China Map (Amap) support?

LovTrip China Map (Amap) is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created LovTrip China Map (Amap)?

It is built and maintained by KLeo (@lizhijun); the current version is v1.1.0.

💬 Comments