返回顶部
n

ncloud-mapsNaver地图API

Query Naver Cloud Maps APIs for route navigation. Smart routing: Directions5 by default, auto-switches to Directions15 for 5+ waypoints.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.8
安全检测
已通过
715
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

ncloud-maps

提示

当用户请求使用地址或坐标进行路线计算时,使用此技能计算驾驶时间、距离和费用。

用法:

  • - /skill ncloud-maps <起点> <终点> [途经点]
  • 起点和终点必须采用经度,纬度格式,或地址(先使用 goplaces/naver-local-search 进行转换)
  • 返回:距离、耗时、通行费、出租车费、燃油费

示例:

  • - /skill ncloud-maps 126.9633,37.5524 127.0165,37.4889(坐标)
  • /skill ncloud-maps 阿岘站 瑞草站(地址 - 需要先使用地理编码技能)

Ncloud Maps

查询 Naver Cloud Maps API 实现智能路线规划(Directions5 + Directions15)。

核心功能:智能路由

v1.0.8+ — 默认情况下,当查询的途经点少于5个时,技能使用 Directions5;当途经点达到5个或更多时,自动切换至 Directions15。无需手动选择。

途经点数量使用的 API最大途经点数量
0–4Directions55
5+
Directions15 | 15 |

设置

  1. 1. 从 Naver Cloud 控制台获取 API 凭证:
- 在 Naver Cloud 控制台中创建/注册应用程序 - 获取客户端 ID(API 密钥 ID)和客户端密钥(API 密钥) - 启用Maps Directions15API
  1. 2. 设置环境变量(或使用 .env 文件):

bash
export NCLOUDAPIKEY_ID=your-api-key-id
export NCLOUDAPIKEY=your-api-key-secret

或者创建 .env 文件:

NCLOUDAPIKEY_ID=your-api-key-id
NCLOUDAPIKEY=your-api-key-secret

  1. 3. 安装依赖:

bash
cd ~/.openclaw/workspace/skills/ncloud-maps
npm install

使用方法

配合地址转坐标技能使用

ncloud-maps 需要采用经度,纬度格式的坐标。如果您拥有基于地址的位置数据,请使用以下兼容技能之一将地址转换为坐标:

可用选项(根据您的环境选择):

技能提供商坐标需要设置
goplacesGoogle Places API是(经度,纬度)GOOGLEPLACESAPIKEY
naver-local-search
Naver Local Search | 是(经度,纬度) | NAVERCLIENTID, NAVERCLIENT_SECRET |
| 自定义 API | 自行选择 | 是(经度,纬度) | 自行设置 |

使用 goplaces 的示例工作流程:

bash

从地址获取坐标


COORDS=$(goplaces resolve 江南站, 首尔 --json | jq -r .places[0] | \(.location.longitude),\(.location.latitude))

使用坐标调用 ncloud-maps

npx ts-node scripts/index.ts --start $COORDS --goal 127.0049,37.4947

使用 naver-local-search 的示例工作流程:

bash

从地址获取坐标


COORDS=$(naver-local-search search 江南站 --format json | jq -r .[0] | \(.x),\(.y))

使用坐标调用 ncloud-maps

npx ts-node scripts/index.ts --start $COORDS --goal 127.0049,37.4947

或者集成任何其他返回经度,纬度坐标的地理编码服务。

智能路由(默认行为)

默认情况下,无需 --api 参数。技能会自动:

  • - 对于 0–4 个途经点使用 Directions5(更快)
  • 对于 5 个及以上途经点切换至 Directions15(必要)

以经度,纬度格式提供坐标:

bash

0–4 个途经点 → Directions5(自动)


npx ts-node scripts/index.ts \
--start 127.0683,37.4979 \
--goal 126.9034,37.5087 \
--waypoints 127.0100,37.5000|127.0200,37.5100

5+ 个途经点 → Directions15(自动)

npx ts-node scripts/index.ts \ --start 127.0683,37.4979 \ --goal 126.9034,37.5087 \ --waypoints 127.0100,37.5000|127.0200,37.5100|127.0300,37.5200|127.0400,37.5300|127.0500,37.5400

通过坐标进行基本路线查询(直接)

bash
npx ts-node scripts/index.ts \
--start 127.0683,37.4979 \
--goal 126.9034,37.5087

强制使用特定 API(可选)

如果需要覆盖智能路由:

bash

强制使用 Directions5(最多 5 个途经点)


npx ts-node scripts/index.ts \
--start 127.0683,37.4979 \
--goal 126.9034,37.5087 \
--api directions5 \
--waypoints 127.0100,37.5000|127.0200,37.5100

强制使用 Directions15(最多 15 个途经点)

npx ts-node scripts/index.ts \ --start 127.0683,37.4979 \ --goal 126.9034,37.5087 \ --api directions15 \ --waypoints 127.0100,37.5000|127.0200,37.5100|127.0300,37.5200|127.0400,37.5300|127.0500,37.5400

带途经点(仅坐标)

bash
npx ts-node scripts/index.ts \
--start 127.0683,37.4979 \
--goal 126.9034,37.5087 \
--waypoints 127.0100,37.5000

多个途经点:
bash
npx ts-node scripts/index.ts \
--start 127.0683,37.4979 \
--goal 126.9034,37.5087 \
--waypoints 127.0100,37.5000|127.0200,37.5100

路线选项

可选值:trafast(快速)、tracomfort(舒适)、traoptimal(默认)、traavoidtoll(避开收费)、traavoidcaronly(避开汽车专用道)

bash
npx ts-node scripts/index.ts \
--start 127.0683,37.4979 \
--goal 126.9034,37.5087 \
--option traavoidtoll

车辆和燃油设置

bash
npx ts-node scripts/index.ts \
--start 127.0683,37.4979 \
--goal 126.9034,37.5087 \
--cartype 2 \
--fueltype diesel \
--mileage 10.5

车辆类型:

  • - 1(默认):小型轿车
  • 2:中型货车/厢式货车
  • 3:大型车辆
  • 4:3轴货运卡车
  • 5:4轴以上特种货运
  • 6:紧凑型汽车

燃油类型:gasoline(默认)、highgradegasoline、diesel、lpg

输出

json
{
success: true,
start: 127.0683,37.4979,
goal: 126.9034,37.5087,
distance: 12850,
duration: 1145000,
toll_fare: 0,
taxi_fare: 18600,
fuel_price: 1550,
departure_time: 2026-02-21T14:10:00
}

响应字段

  • - success - 查询是否成功
  • start - 起点坐标
  • goal - 目的地坐标
  • distance - 总距离(米)
  • duration - 总耗时(毫秒,÷1000 = 秒)
  • toll_fare - 通行费/高速公路费(韩元)

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 ncloud-maps-1776420091 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 ncloud-maps-1776420091 技能

通过命令行安装

skillhub install ncloud-maps-1776420091

下载

⬇ 下载 ncloud-maps v1.0.8(免费)

文件大小: 28.5 KB | 发布时间: 2026-4-17 19:45

v1.0.8 最新 2026-4-17 19:45
**Added concise usage prompt for direct skill invocation.**

- Added a "Prompt" section at the top of SKILL.md with example commands and usage guidance for address and coordinate input.
- Clarified coordinate and address handling, emphasizing the need for address-to-coordinate conversion.
- Kept all routing behavior and API usage unchanged.
- No changes to logic or dependencies; documentation improvement only.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部