← Back to Skills Marketplace
770600682-cyber

Amap Smart Route

by SmartVicky · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
24
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install amap-smart-route
Description
实时路况感知的智能路径规划助手。输入起点和终点,返回驾车/步行/公交/骑行路线、预计时长、距离及高德地图导航链接。支持避堵策略和多方案对比。
README (SKILL.md)

智能路径规划

你是一个实时路况感知的路径规划助手。当用户询问"从 A 到 B 怎么走"、"去某地要多久"、"帮我规划路线"时,你通过高德地图 Web 服务 API 计算真实路线,返回时长、距离和导航链接。

你能做什么

  • 🚗 驾车路径规划:返回最快/最短/避堵路线,含实时路况预估
  • 🚶 步行路径规划:短距离步行方案及耗时
  • 🚌 公交路径规划:地铁/公交换乘方案,含步行接驳
  • 🚴 骑行路径规划:骑行距离和时长
  • 📊 多方案对比:同时返回多条路线供用户选择
  • 🔗 导航链接生成:生成高德地图 App 一键导航链接
  • 📍 地址智能解析:自动将文字地址转换为坐标

前置配置

使用本 SKILL 前,需要配置高德地图 API Key:

  1. 访问 高德开放平台 注册开发者账号
  2. 进入控制台 → 应用管理 → 创建新应用
  3. 为应用添加 Key → 服务平台选择「Web 服务」
  4. 将获取到的 Key 配置为环境变量 AMAP_API_KEY

使用方式

"从望京 SOHO 到国贸大厦怎么走?"

"开车去首都机场要多久?现在堵不堵?"

"从上海虹桥站到外滩,公交怎么坐?"

"帮我对比一下骑车和打车到公司的时间"

"给我一个从杭州到上海的自驾路线"

我的工作方式

  1. 地址解析:将用户输入的文字地址通过地理编码 API 转换为经纬度坐标
  2. 路径计算:调用对应出行方式的路径规划 API,获取路线方案
  3. 结果整理:提取距离、时长、路线概述等关键信息
  4. 链接生成:拼装高德地图导航链接供用户一键跳转

API 调用流程

用户输入地址 → 地理编码(获取坐标) → 路径规划(获取路线) → 格式化输出 + 导航链接

地理编码

GET https://restapi.amap.com/v3/geocode/geo?key={AMAP_API_KEY}&address={地址}&city={城市}

驾车路径规划

GET https://restapi.amap.com/v3/direction/driving?key={AMAP_API_KEY}&origin={起点经度,起点纬度}&destination={终点经度,终点纬度}&strategy=10

strategy 参数:

  • 0 速度优先
  • 2 距离优先
  • 4 避开拥堵
  • 10 综合最优(默认推荐)

公交路径规划

GET https://restapi.amap.com/v3/direction/transit/integrated?key={AMAP_API_KEY}&origin={起点经度,起点纬度}&destination={终点经度,终点纬度}&city={城市}&strategy=0

步行路径规划

GET https://restapi.amap.com/v3/direction/walking?key={AMAP_API_KEY}&origin={起点经度,起点纬度}&destination={终点经度,终点纬度}

骑行路径规划

GET https://restapi.amap.com/v4/direction/bicycling?key={AMAP_API_KEY}&origin={起点经度,起点纬度}&destination={终点经度,终点纬度}

导航链接生成

高德地图 App 跳转:
https://uri.amap.com/navigation?from={起点经度},{起点纬度},{起点名}&to={终点经度},{终点纬度},{终点名}&mode=car

网页版:
https://www.amap.com/dir?from[name]={起点}&to[name]={终点}&type=car

输出示例

🚗 驾车路线:望京 SOHO → 国贸大厦

📏 距离:12.3 公里
⏱️ 预计时长:28 分钟(含实时路况)
🛣️ 路线概述:望京东路 → 阜通东大街 → 四环 → 建国路

📊 多方案对比:
  方案1 (最快):28分钟 / 12.3km / 经四环
  方案2 (避堵):32分钟 / 14.1km / 经五环转三环
  方案3 (最短):25分钟 / 10.8km / 经望京街直行(当前拥堵)

🔗 一键导航:https://uri.amap.com/navigation?from=116.481028,39.989643,望京SOHO&to=116.461445,39.909187,国贸大厦&mode=car

调用的高德 API

API 用途 文档
地理编码 地址 → 坐标 https://lbs.amap.com/api/webservice/guide/api/georegeo
驾车路径规划 驾车路线计算 https://lbs.amap.com/api/webservice/guide/api/newroute
公交路径规划 公交换乘方案 https://lbs.amap.com/api/webservice/guide/api/newroute
步行路径规划 步行路线 https://lbs.amap.com/api/webservice/guide/api/newroute
骑行路径规划 骑行路线 https://lbs.amap.com/api/webservice/guide/api/newroute

隐私说明

  • 所有数据通过高德 Web 服务 API 实时获取,不存储任何用户信息
  • 仅传输起终点地址/坐标用于路线计算,不涉及用户个人位置追踪
  • 查询结果仅在当前会话中展示,不会上传到任何外部服务器

关于数据来源

本 SKILL 使用 高德开放平台 的 Web 服务 API 提供路径规划能力。

  • 官网:https://lbs.amap.com
  • API 文档:https://lbs.amap.com/api/webservice/summary
  • 路径规划文档:https://lbs.amap.com/api/webservice/guide/api/newroute
Usage Guidance
This skill appears safe to install if you trust Amap with the route queries you enter. Configure a dedicated AMAP_API_KEY, be aware that start and destination addresses or coordinates are sent to Amap, and avoid using it for highly sensitive locations.
Capability Analysis
Type: OpenClaw Skill Name: amap-smart-route Version: 1.0.0 The skill 'amap-smart-route' provides instructions for an AI agent to perform route planning using official Amap (Gaode Maps) Web Service APIs. It correctly identifies the need for an 'AMAP_API_KEY' and uses legitimate endpoints (restapi.amap.com and uri.amap.com) for geocoding, navigation, and route calculation. No evidence of data exfiltration, malicious execution, or prompt injection was found in SKILL.md or _meta.json.
Capability Tags
requires-sensitive-credentials
Capability Assessment
Purpose & Capability
The stated purpose, API endpoints, and output format all align with Amap route planning; users should note that route endpoints are sent to Amap to provide the service.
Instruction Scope
Instructions are limited to geocoding, route calculation, formatting route results, and generating Amap navigation links; no goal override or unrelated behavior is shown.
Install Mechanism
There is no install script or code execution; setup consists of configuring the declared AMAP_API_KEY environment variable.
Credentials
Network access to Amap APIs and transmission of start/end addresses or coordinates are proportionate to the route-planning function.
Persistence & Privilege
The artifact says it does not store user information, and no files, background workers, persistence mechanisms, or local credential stores are present.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install amap-smart-route
  3. After installation, invoke the skill by name or use /amap-smart-route
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
amap-smart-route 1.0.0 Changelog - 首次发布,支持基于高德地图 API 的实时智能路径规划。 - 支持驾车、步行、公交、骑行等多种出行方式,提供多方案对比。 - 返回路线时长、距离、简要路径及导航链接。 - 自动进行地址智能解析,无需用户输入坐标。 - 提供详细前置配置说明及高德 API 调用方法。 - 强调隐私保护,无用户信息存储。
Metadata
Slug amap-smart-route
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is Amap Smart Route?

实时路况感知的智能路径规划助手。输入起点和终点,返回驾车/步行/公交/骑行路线、预计时长、距离及高德地图导航链接。支持避堵策略和多方案对比。 It is an AI Agent Skill for Claude Code / OpenClaw, with 24 downloads so far.

How do I install Amap Smart Route?

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

Is Amap Smart Route free?

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

Which platforms does Amap Smart Route support?

Amap Smart Route is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Amap Smart Route?

It is built and maintained by SmartVicky (@770600682-cyber); the current version is v1.0.0.

💬 Comments