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 位。

列表預設按累計下載量排序,也可按星標排序;詳情頁排名按累計下載量計算。

累計下載
7709
星標
9
全站下載量排名
#3,612
全站前 34% · 「AI 智慧體」前 30%
平台累計下載星標評論
ClawHub ↗59689-
SkillHub ↗77099—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

它透過一個 Python 命令列助手提供多種操作:計算帶路況預測的行程時間與距離、逐步導航、多起點多終點的距離矩陣、地址與座標的正反地理編碼、地點搜尋與詳情、以及含到達時間的公交規劃。使用前需要 GOOGLE_API_KEY 環境變數,並在 Google Cloud 中啟用 Routes API、Places API 與 Geocoding API,同時安裝 Python 的 requests 包。支援駕車/步行/騎行/公交多種出行模式、best_guess/pessimistic/optimistic 路況模型、避開收費或高速等選項,以及未來出發時間;地址可為多語言。

資料釋出於 2026-10-27

可以用來做什麼

  • 根據起點和終點計算帶路況預測的駕車行程時間

什麼時候用

  • 需要路線規劃、距離矩陣、地理編碼或地點搜尋的地圖類任務時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

用 driving 模式計算從紐約到波士頓的行程時間,並採用 pessimistic 路況模型。

月度資料趨勢

累計下載7709
3749587680022026-03 · 累計下載 40422026-05 · 累計下載 49312026-06 · 累計下載 51412026-07 · 累計下載 55092026-08 · 累計下載 56742026-09 · 累計下載 61092026-10 · 累計下載 770926-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-107709—9
2026-096109—9
2026-085674+3.0%9
2026-075509+7.2%9
2026-065141+4.3%9
2026-054931—9
2026-034042—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),按月更新。口徑說明見資料方法。