shaharsh

Google Maps

AI 智能体v3.2.0
作者:shaharsh更新于 2026-05-11共 9 个版本 · 最新版本发布于 2026-03-22google-maps@clawhub_shaharsha/google-maps
工具调用#Google#Maps#Directions#Geocoding#Places

据 AlphaMoat 统计,截至 2026-10,Google Maps 累计下载 7,709 次、获 9 个星标,按累计下载量在本次参与排名的 10,914 个 AI 技能中排名第 3,612 位,在「AI 智能体」分类(1,632 个)中排名第 483 位。

列表默认按累计下载量排序,也可按星标排序;详情页排名按累计下载量计算。

累计下载
7,709
星标
9
全站下载量排名
#3,612
全站前 34% · 「AI 智能体」前 30%
平台累计下载星标评论
ClawHub ↗5,9689-
SkillHub ↗7,7099—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

它通过一个 Python 命令行助手提供多种操作:计算带路况预测的行程时间与距离、逐步导航、多起点多终点的距离矩阵、地址与坐标的正反地理编码、地点搜索与详情、以及含到达时间的公交规划。使用前需要 GOOGLE_API_KEY 环境变量,并在 Google Cloud 中启用 Routes API、Places API 与 Geocoding API,同时安装 Python 的 requests 包。支持驾车/步行/骑行/公交多种出行模式、best_guess/pessimistic/optimistic 路况模型、避开收费或高速等选项,以及未来出发时间;地址可为多语言。

资料发布于 2026-10-27

可以用来做什么

  • 根据起点和终点计算带路况预测的驾车行程时间

什么时候用

  • 需要路线规划、距离矩阵、地理编码或地点搜索的地图类任务时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

用 driving 模式计算从纽约到波士顿的行程时间,并采用 pessimistic 路况模型。

月度数据趋势

累计下载7,709
3,7495,8768,0022026-03 · 累计下载 4,0422026-05 · 累计下载 4,9312026-06 · 累计下载 5,1412026-07 · 累计下载 5,5092026-08 · 累计下载 5,6742026-09 · 累计下载 6,1092026-10 · 累计下载 7,70926-0326-0926-10
星标9
8992026-03 · 星标 82026-05 · 星标 92026-06 · 星标 92026-07 · 星标 92026-08 · 星标 92026-09 · 星标 92026-10 · 星标 926-0326-0926-10

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-107,709—9
2026-096,109—9
2026-085,674+3.0%9
2026-075,509+7.2%9
2026-065,141+4.3%9
2026-054,931—9
2026-034,042—8

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

6.6 KB · ClawHub v3.2.0
---
name: google-maps
description: >
  Google Maps integration for OpenClaw with Routes API. Use for: (1) Distance/travel time calculations 
  with traffic prediction, (2) Turn-by-turn directions, (3) Distance matrix between multiple points, 
  (4) Geocoding addresses to coordinates and reverse, (5) Places search and details, (6) Transit 
  planning with arrival times. Supports future departure times, traffic models (pessimistic/optimistic), 
  avoid options (tolls/highways), and multiple travel modes (driving/walking/bicycling/transit).
version: 3.2.0
author: Leo 🦁
展开全部(共 234 行)
tags: [maps, places, location, navigation, google, traffic, directions, geocoding, routes-api]
metadata: {"clawdbot":{"emoji":"🗺️","requires":{"env":["GOOGLE_API_KEY"],"python":["requests"]},"primaryEnv":"GOOGLE_API_KEY","secondaryEnv":["GOOGLE_MAPS_API_KEY"],"optionalEnv":["GOOGLE_MAPS_LANG"],"notes":"Requires the 'requests' Python package (pip install requests). No other external dependencies."}}
allowed-tools: [exec]
---

# Google Maps 🗺️

Google Maps integration powered by the Routes API.

## Requirements

- `GOOGLE_API_KEY` environment variable
- Enable in Google Cloud Console: Routes API, Places API, Geocoding API
- Python package: `requests` (`pip install requests`)

## Configuration

| Env Variable | Default | Description |
|--------------|---------|-------------|
| `GOOGLE_API_KEY` | - | Required. Your Google Maps API key |
| `GOOGLE_MAPS_API_KEY` | - | Alternative to `GOOGLE_API_KEY` (fallback) |
| `GOOGLE_MAPS_LANG` | `en` | Response language (en, he, ja, etc.) |

Set in OpenClaw config:
```json
{
  "env": {
    "GOOGLE_API_KEY": "AIza...",
    "GOOGLE_MAPS_LANG": "en"
  }
}
```

## Script Location

```bash
python3 skills/google-maps/lib/map_helper.py <action> [options]
```

---

## Actions

### distance - Calculate travel time

```bash
python3 skills/google-maps/lib/map_helper.py distance "origin" "destination" [options]
```

**Options:**
| Option | Values | Description |
|--------|--------|-------------|
| `--mode` | driving, walking, bicycling, transit | Travel mode (default: driving) |
| `--depart` | now, +30m, +1h, 14:00, 2026-02-07 08:00 | Departure time |
| `--arrive` | 14:00 | Arrival time (transit only) |
| `--traffic` | best_guess, pessimistic, optimistic | Traffic model |
| `--avoid` | tolls, highways, ferries | Comma-separated |

**Examples:**
```bash
python3 skills/google-maps/lib/map_helper.py distance "New York" "Boston"
python3 skills/google-maps/lib/map_helper.py distance "Los Angeles" "San Francisco" --depart="+1h"
python3 skills/google-maps/lib/map_helper.py distance "Chicago" "Detroit" --depart="08:00" --traffic=pessimistic
python3 skills/google-maps/lib/map_helper.py distance "London" "Manchester" --mode=transit --arrive="09:00"
python3 skills/google-maps/lib/map_helper.py distance "Paris" "Lyon" --avoid=tolls,highways
```

**Response:**
```json
{
  "distance": "215.2 mi",
  "distance_meters": 346300,
  "duration": "3 hrs 45 mins",
  "duration_seconds": 13500,
  "static_duration": "3 hrs 30 mins",
  "duration_in_traffic": "3 hrs 45 mins"
}
```

---

### directions - Turn-by-turn route

```bash
python3 skills/google-maps/lib/map_helper.py directions "origin" "destination" [options]
```

**Additional options (beyond distance):**
| Option | Description |
|--------|-------------|
| `--alternatives` | Return multiple routes |
| `--waypoints` | Intermediate stops (pipe-separated) |
| `--optimize` | Optimize waypoint order (TSP) |

**Examples:**
```bash
python3 skills/google-maps/lib/map_helper.py directions "New York" "Washington DC"
python3 skills/google-maps/lib/map_helper.py directions "San Francisco" "Los Angeles" --alternatives
python3 skills/google-maps/lib/map_helper.py directions "Miami" "Orlando" --waypoints="Fort Lauderdale|West Palm Beach" --optimize
```

**Response includes:** summary, labels, duration, static_duration, warnings, steps[], optimized_waypoint_order

---

### matrix - Distance matrix

Calculate distances between multiple origins and destinations:

```bash
python3 skills/google-maps/lib/map_helper.py matrix "orig1|orig2" "dest1|dest2"
```

**Example:**
```bash
python3 skills/google-maps/lib/map_helper.py matrix "New York|Boston" "Philadelphia|Washington DC"
```

**Response:**
```json
{
  "origins": ["New York", "Boston"],
  "destinations": ["Philadelphia", "Washington DC"],
  "results": [
    {"origin_index": 0, "destination_index": 0, "distance": "97 mi", "duration": "1 hr 45 mins"},
    {"origin_index": 0, "destination_index": 1, "distance": "225 mi", "duration": "4 hrs 10 mins"}
  ]
}
```

---

### geocode - Address to coordinates

```bash
python3 skills/google-maps/lib/map_helper.py geocode "1600 Amphitheatre Parkway, Mountain View, CA"
python3 skills/google-maps/lib/map_helper.py geocode "10 Downing Street, London"
```

### reverse - Coordinates to address

```bash
python3 skills/google-maps/lib/map_helper.py reverse 40.7128 -74.0060  # New York City
python3 skills/google-maps/lib/map_helper.py reverse 51.5074 -0.1278  # London
```

---

### search - Find places

```bash
python3 skills/google-maps/lib/map_helper.py search "coffee near Times Square"
python3 skills/google-maps/lib/map_helper.py search "pharmacy in San Francisco" --open
```

### details - Place information

```bash
python3 skills/google-maps/lib/map_helper.py details "<place_id>"
```

---

## Traffic Models

| Model | Use Case |
|-------|----------|
| `best_guess` | Default balanced estimate |
| `pessimistic` | Important meetings (worst-case) |
| `optimistic` | Best-case scenario |

---

## Regional Notes

Some features may not be available in all countries:

| Feature | Availability |
|---------|--------------|
| `--fuel-efficient` | US, EU, select countries |
| `--shorter` | Limited availability |
| `--mode=two_wheeler` | Asia, select countries |

Check [Google Maps coverage](https://developers.google.com/maps/coverage) for details.

---

## Multilingual Support

Works with addresses in any language:

```bash
# Hebrew
python3 skills/google-maps/lib/map_helper.py distance "תל אביב" "ירושלים"
python3 skills/google-maps/lib/map_helper.py geocode "דיזנגוף 50, תל אביב"

# Japanese
python3 skills/google-maps/lib/map_helper.py distance "東京" "大阪"

# Arabic
python3 skills/google-maps/lib/map_helper.py distance "دبي" "أبو ظبي"
```

**Language configuration:**

1. Set default via env: `GOOGLE_MAPS_LANG=he` (persists)
2. Override per-request: `--lang=ja`

```bash
# Set Hebrew as default in OpenClaw config
GOOGLE_MAPS_LANG=he

# Override for specific request
python3 skills/google-maps/lib/map_helper.py distance "Tokyo" "Osaka" --lang=ja
```

---

## Help

```bash
python3 skills/google-maps/lib/map_helper.py help
```

「AI 智能体」分类下的热门技能

shaharsh 的其他技能

数据月份:2026-10 · 下载/星标数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。