amap-route-planner
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "amap-route-planner" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-8536b7667dfcb64aecc5d975d57a2ed60cc736531c46be4ebded902303aa4eea. Verify the upstream source and version against https://skillhub.cn/skills/user_5a90548c/amap-route-planner before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
A multi-destination intelligent route planner built on the Amap (Gaode) Maps JS API 2.0 that produces a standalone interactive web application to address multi-destination trip needs: set start point, add/edit destinations, choose transport modes, optimize and export routes, etc. (example triggers: route planner, multi-destination, navigation planning).
Introduction source: third_party · user_5a90548c · 2.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: amap-route-planner
slug: amap-route-planner
displayName: "高德多目的地路线规划师"
description: "基于高德地图 JS API 2.0 的多目的地智能路线规划工具。生成一个独立的交互式 Web 应用,支持设置起点、动态添加/删除/编辑目的地、自驾/公交/步行三种交通方式、智能路线优化与自定义顺序、省市区三级搜索范围、截图 OCR 识别地址、多日行程规划、路线偏好设置、实时路况、路线导出与分享、保存加载、移动端适配、离线模式、无障碍支持。当用户需要路线规划、多目的地导航、出行路线安排、地图路径规划时使用此技能。触发词包括:路线规划、多目的地、导航规划、出行路线、地图规划、route planner。"
version: "2.0.0"
category: "工具"
platforms:
- workbuddy
- claude-code
- cursor
- windsurf
agent_created: true高德多目的地路线规划师
Overview
生成一个基于高德地图 JS API 2.0 的单文件 Web 应用,支持多目的地路线规划、三种交通方式、 智能优化与自定义排序、截图 OCR 识别地址。应用为暗色主题,交互式地图,用户自带高德 API Key。
Quick Start
1. 部署应用
将 assets/index.html 复制到用户工作目录,启动本地 HTTP 服务器:
mkdir -p <workspace>/route-planner
cp <skill-dir>/assets/index.html <workspace>/route-planner/index.html
cd <workspace>/route-planner
python -m http.server 8765
然后用 present_files 呈现 http://localhost:8765/index.html。
2. 用户配置 API Key
首次打开应用时弹出密钥输入框。用户需要:
- 访问 高德开放平台 注册登录
- 控制台 → 应用管理 → 创建新应用
- 添加 Key → 服务平台选「Web端(JS API)」(不是「Web服务」)
- 复制 Key 填入应用;安全密钥有就填,没有留空
- Key 的域名白名单加上
localhost和127.0.0.1
详细配置指南见 references/amap-setup.md。
3. 使用流程
- 在「搜索范围」选择省/市/县(逐级可选,不强制)
- 输入起点 → 按 Enter 或点 + 确认(也可从候选列表选择)
- 逐一添加目的地(支持粘贴截图 Ctrl+V 自动 OCR 识别地址)
- 选择交通方式:自驾 / 公交 / 步行
- 选择路线顺序:智能优化(最近邻)/ 自定义顺序(拖拽或按钮调整)
- 点「规划路线」→ 地图自动绘制路线,显示总距离和时间
- 随时增删目的地、换起点、换交通方式 → 路线自动重新规划
Core Features
地址搜索与确认
- 使用
AMap.AutoComplete+AMap.PlaceSearch实现实时候选列表 - 用户必须从候选列表选择具体地点,避免地理编码歧义
- 输入框失焦自动确认,键盘上下键选择候选
- 搜索范围支持省/市/县三级联动,非强制逐级选择
三种交通方式
- 自驾:
AMap.Driving,支持多途经点 - 公交:
AMap.Transfer,支持换乘方案 - 步行:
AMap.Walking,短距离路径
路线顺序
- 智能优化:最近邻算法自动排序,最少跑冤枉路
- 自定义顺序:拖拽或 ↑↓ 按钮调整,路线按用户选择重新规划
截图 OCR 识别
- 使用 Tesseract.js v4(CDN 懒加载,中文模型 chi_sim)
- 支持 Ctrl+V 粘贴截图或上传图片
- 识别后弹出确认框,可编辑文字,批量添加为目的地
目的地管理
- 每个目的地支持:✎ 修改名称、📍 设为新起点、✕ 删除
- 修改名称时回填到输入框,从候选列表重新选择
多日行程规划
- 行程天数选择(1-7天),每个目的地有 day 徽章(点击切换天数)
- 按天分组规划路线,每天独立汇总距离和时间
- 前一天最后一个目的地自动成为下一天的起点
路线偏好设置(自驾)
- 路线策略:最短距离 / 最快时间 / 最少费用
- 避开轮渡选项
- 切换策略自动重新规划
实时路况
- 地图右上角路况开关按钮(🚦)
- 使用 AMap.TrafficLayer,自动刷新
- 自驾路线规划时可显示路况颜色
路线导出与分享
- PNG 图片:html2canvas 截取路线概览,下载图片
- 打印/PDF:window.print() + 打印专用 CSS
- 分享链接:路线数据编码为 base64 URL hash,复制到剪贴板,打开即自动加载
路线保存与加载
- 保存当前路线方案到 localStorage(命名管理)
- 加载/删除已保存的路线
- 刷新页面不丢失
地图样式与主题
- 三种地图样式循环切换:暗色 / 标准 / 浅色
- 明暗主题切换(🌙/☀),同步切换地图样式
- 主题偏好保存在 localStorage
移动端适配
- 768px 以下侧边栏变为滑出式抽屉
- 汉堡菜单按钮控制开关
- 触摸友好的按钮尺寸
- 背景遮罩点击关闭
离线模式
- 路线规划成功后自动缓存到 localStorage
- 网络断开或 Key 加载失败时显示缓存路线
- 离线横幅提示
无障碍支持
- ARIA 标签覆盖所有交互元素
- 明暗主题切换提供高对比度选项
- 键盘导航支持(上下键选候选、Enter 确认、ESC 关闭)
- 打印样式优化
Architecture
- 单文件 HTML:所有 CSS/JS 内联,无构建依赖
- 用户自带 Key:每个用户使用自己的高德 API Key,调用量消耗在各自配额中
- 密钥存储:localStorage,不上传任何服务器
- 地图引擎:高德地图 JS API 2.0,支持暗色/标准/浅色三种样式切换
- 行政区查询:
AMap.DistrictSearch实现省/市/县三级联动 - OCR 引擎:Tesseract.js v4,首次使用时 CDN 懒加载约 10MB 中文模型
- 路况图层:
AMap.TrafficLayer实时路况显示 - 离线缓存:路线数据缓存到 localStorage,断网时可查看
- 导出引擎:html2canvas(CDN 懒加载)用于 PNG 导出
Important Notes
Key 类型
必须创建「Web端(JS API)」类型的 Key。「Web服务」类型没有安全密钥,也无法用于浏览器端。
搜索范围
getSearchScope() 函数实现了省级兜底:只选省时用省名作为 city 参数,
不会掉成全国搜索。市/县下拉第一项为「不限」,不强制选择。
防重复添加
confirmStart 和 confirmDest 函数有执行锁(startConfirming / destConfirming),
防止 blur 自动确认 + 按钮点击 重复触发。+ 按钮加了 mousedown preventDefault 阻止输入框失焦。
AMap 插件加载
script src 中需包含所有用到的插件:
AMap.PlaceSearch,AMap.AutoComplete,AMap.Driving,AMap.Transfer,AMap.Walking,AMap.DistrictSearch,AMap.TrafficLayer
收费说明
详细收费见 references/amap-pricing.md。核心要点:
- 个人开发者有免费月配额(LBS 15万次、搜索 5,000次)
- 商业使用需购买技术服务许可(基础版 5万/年、高级版 10万/年)
- 本应用采用用户自带 Key 架构,发布者不承担任何 API 费用
Resources
assets/index.html— 完整的路线规划应用(单文件,可直接部署)references/amap-setup.md— 高德 API Key 配置指南与常见问题references/amap-pricing.md— 高德地图 API 收费标准与用量估算
Current listing version
2.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供完整的多目的地路线规划功能,支持三种交通方式和智能优化
- 集成 OCR 截图识别地址,提升输入效率
- 支持多日行程规划与离线缓存,满足复杂出行需求
Highlights
- 触发词覆盖全面,包括路线规划、多目的地、导航规划等核心场景
- 边界清晰,不易与其他地图工具混淆
Highlights
- 文档结构清晰,包含快速开始、核心功能、架构说明等完整章节
- 提供详细的部署和使用流程,frontmatter 信息完整
Highlights
- 工具来源明确,依赖高德 JS API 2.0 和主流开源库
- 实现防重复添加和执行锁机制,提升交互稳定性
- 支持离线缓存和异常处理,保障核心功能可用性
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Accounts, secrets or authorization
Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.
Mentioned in main document · lines 21, 38, 40, 45, 136
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- lbs.amap.com
- localhost
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.