Community程式設計與開發github.com

ComposioHQ/google-maps-automation-le-maps-automation

透過 Rube MCP(Composio)自動化 Google Maps 任務:地理編碼地址、搜尋地點、取得路線、計算距離矩陣、反向地理編碼、自動完成、取得地點詳細資料。使用前請務必先搜尋工具以取得最新模式。

google-maps-automation-le-maps-automation 是什麼?

此技能可讓 AI 代理透過 Rube MCP(Composio)直接與 Google Maps 互動,無需傳統 API 金鑰即可執行常見的地圖工作流程。支援的動作包括地理編碼(地址轉經緯度)、反向地理編碼(經緯度轉地址)、文字搜尋地點、附近地點搜尋、計算兩點間的路線及距離矩陣、取得詳細的地點資訊(營業時間、聯絡方式、評論)、自動完成地址輸入,以及嵌入地圖。技能使用前必須先呼叫 `RUBE_SEARCH_TOOLS` 以確認工具可用性,並透過 `RUBE_MANAGE_CONNECTIONS` 建立與 `google_maps` 工具組的連線。適用於 Claude Code、Coder、Cline 等支援 MCP 的 AI 代理平台。被廣泛用於物流路線規劃、本地商家探索、旅遊行程安排與空間資料分析等場景。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComposioHQ/awesome-codex-skills/tree/main/composio-skills/google-maps-automation

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

透過 Rube MCP 自動化 Google Maps

使用 Google Maps(透過 Rube MCP/Composio)進行地理編碼地址、搜尋地點、取得路線、計算距離矩陣,以及擷取地點詳細資料。

工具組文件:composio.dev/toolkits/google_maps

先決條件

  • Rube MCP 必須已連線(可使用 RUBE_SEARCH_TOOLS)
  • 透過 RUBE_MANAGE_CONNECTIONS 與工具組 google_maps 建立有效連線
  • 請務必先呼叫 RUBE_SEARCH_TOOLS 以取得目前工具的模式

設定

取得 Rube MCP:在客戶端設定中將 https://rube.app/mcp 新增為 MCP 伺服器。無需 API 金鑰 — 只需新增端點即可運作。

  1. 確認 RUBE_SEARCH_TOOLS 有回應,以驗證 Rube MCP 可用
  2. 使用工具組 google_maps 呼叫 RUBE_MANAGE_CONNECTIONS
  3. 若連線狀態不是 ACTIVE,請依照回傳的驗證連結完成設定
  4. 在執行任何工作流程前,確認連線狀態顯示為 ACTIVE

核心工作流程

1. 地理編碼地址

使用 GOOGLE_MAPS_GEOCODING_API 將街道地址轉換為地理座標(緯度/經度)。

工具:GOOGLE_MAPS_GEOCODING_API
參數:
  - address:要地理編碼的街道地址或 plus code
  - latlng:反向地理編碼用的經緯度(例如 "40.714224,-73.961452")
  - place_id:地點地理編碼用的 Place ID
  - language:結果的語言
  - region:區域偏重(ccTLD 代碼)
  - bounds:視窗偏重的邊界框
  - components:元件過濾(例如 "postal_code:94043|country:US")

2. 搜尋地點

使用 GOOGLE_MAPS_TEXT_SEARCH 透過自由文字查詢尋找地點。

工具:GOOGLE_MAPS_TEXT_SEARCH
參數:
  - textQuery(必要):搜尋文字(例如 "restaurants in London")
  - fieldMask:要回傳的欄位(例如 "displayName,formattedAddress,rating")
  - maxResultCount:最大結果數(1-20,預設為 10)

3. 取得兩地點間的路線

使用 GOOGLE_MAPS_GET_ROUTE 計算包含距離與時間的路線。

工具:GOOGLE_MAPS_GET_ROUTE
參數:
  - origin_address(必要):起點(地址或 "lat,lng")
  - destination_address(必要):終點(地址或 "lat,lng")
  - travelMode:DRIVE、BICYCLE、WALK、TWO_WHEELER 或 TRANSIT
  - routingPreference:TRAFFIC_UNAWARE、TRAFFIC_AWARE、TRAFFIC_AWARE_OPTIMAL
  - computeAlternativeRoutes:回傳替代路線(布林值)
  - units:METRIC 或 IMPERIAL
  - languageCode:BCP-47 語言代碼
  - routeModifiers_avoidTolls / avoidHighways / avoidFerries:路線偏好設定

4. 計算距離矩陣

使用 GOOGLE_MAPS_COMPUTE_ROUTE_MATRIX 計算多個起點與終點之間的距離與時間。

工具:GOOGLE_MAPS_COMPUTE_ROUTE_MATRIX
參數:
  - origins(必要):起點位置陣列(地址字串或 lat/lng 物件)
  - destinations(必要):終點位置陣列
  - travelMode:DRIVE、BICYCLE、WALK、TWO_WHEELER 或 TRANSIT
  - routingPreference:TRAFFIC_UNAWARE、TRAFFIC_AWARE、TRAFFIC_AWARE_OPTIMAL
  - fieldMask:要包含的回應欄位
  - units:METRIC 或 IMPERIAL

5. 取得地點詳細資訊

使用 GOOGLE_MAPS_GET_PLACE_DETAILS 取得特定地點的綜合資訊。

工具:GOOGLE_MAPS_GET_PLACE_DETAILS
說明:使用地點的資源名稱(places/{place_id} 格式)擷取詳細資訊。
      回傳營業時間、聯絡方式、評論等。
注意:請呼叫 RUBE_SEARCH_TOOLS 取得此工具的完整模式。

6. 搜尋附近地點

使用 GOOGLE_MAPS_NEARBY_SEARCH 尋找某點圓形區域內的地點。

工具:GOOGLE_MAPS_NEARBY_SEARCH
參數:
  - latitude(必要):中心緯度(-90 到 90)
  - longitude(必要):中心經度(-180 到 180)
  - radius(必要):搜尋半徑(公尺,最大 50000)
  - includedTypes:要包含的地點類型(例如 ["restaurant", "cafe"])
  - excludedTypes:要排除的地點類型
  - fieldMask:要回傳的欄位
  - maxResultCount:最大結果數(1-20)

常見模式

  • 地理編碼後規劃路線:使用 GOOGLE_MAPS_GEOCODING_API 將地址轉換為座標,再用 GOOGLE_MAPS_GET_ROUTE 取得兩點間的路線。
  • 搜尋後檢視詳細資訊:使用 GOOGLE_MAPS_TEXT_SEARCH 尋找地點,再用 GOOGLE_MAPS_GET_PLACE_DETAILS 取得更豐富的中繼資料(營業時間、聯絡方式、評論)。
  • 自動完成使用者體驗:使用 GOOGLE_MAPS_AUTOCOMPLETE 在使用者輸入地址或地點名稱時提供即時搜尋建議。
  • 反向地理編碼:使用 GOOGLE_MAPS_GEOCODE_LOCATION 將座標轉換回人類可讀的地址。
  • 批次距離計算:使用 GOOGLE_MAPS_COMPUTE_ROUTE_MATRIX 進行多對多距離計算,而非重複呼叫 GOOGLE_MAPS_GET_ROUTE。
  • 嵌入地圖:使用 GOOGLE_MAPS_MAPS_EMBED_API 為地點、路線或搜尋結果產生可嵌入的地圖網址。

已知陷阱

  • 路線矩陣結果結構:GOOGLE_MAPS_COMPUTE_ROUTE_MATRIX 會在 data.elements 下回傳結果,內含 originIndex 與 destinationIndex,以及 distanceMeters 和 duration,而非 routes[] 結構。
  • 時間格式:GOOGLE_MAPS_GET_ROUTE 回傳的時間為字串,例如 "937s",位於 data.response_data.routes 內。進行數值比較前必須先解析。
  • 鏈結使用的 Place ID:在呼叫 GOOGLE_MAPS_GET_PLACE_DETAILS 時,使用從 GOOGLE_MAPS_TEXT_SEARCH 回傳的地點識別碼以取得更豐富的欄位。
  • 反向地理編碼輸入:GOOGLE_MAPS_GEOCODE_LOCATION 是以座標驅動。請確保傳入 lat/lng(而非地址字串),以避免錯誤查詢。
  • 路線偏好限制:當 travelMode 為 WALK、BICYCLE 或 TRANSIT 時,不能設定 routingPreference;這些模式必須省略該參數。
  • 附近搜尋類型有效性:"food" 不是 GOOGLE_MAPS_NEARBY_SEARCH 的有效類型(屬於表 B)。請改用具體類型,例如 restaurant、cafe、bakery、fast_food_restaurant。
  • 嵌入 API 僅限 API 金鑰:GOOGLE_MAPS_MAPS_EMBED_API 需要 API 金鑰,不支援 OAuth2。

快速參考

動作工具關鍵參數
地理編碼地址GOOGLE_MAPS_GEOCODING_APIaddress 或 latlng 或 place_id
反向地理編碼GOOGLE_MAPS_GEOCODE_LOCATION(請透過 RUBE_SEARCH_TOOLS 檢視完整模式)
文字搜尋GOOGLE_MAPS_TEXT_SEARCHtextQuery、fieldMask、maxResultCount
附近搜尋GOOGLE_MAPS_NEARBY_SEARCHlatitude、longitude、radius、includedTypes
取得路線GOOGLE_MAPS_GET_ROUTEorigin_address、destination_address、travelMode
距離矩陣GOOGLE_MAPS_COMPUTE_ROUTE_MATRIXorigins、destinations、travelMode
地點詳細資訊GOOGLE_MAPS_GET_PLACE_DETAILS(請透過 RUBE_SEARCH_TOOLS 檢視完整模式)
自動完成GOOGLE_MAPS_AUTOCOMPLETEinput、includedRegionCodes、locationBias
地點照片GOOGLE_MAPS_PLACE_PHOTO(請透過 RUBE_SEARCH_TOOLS 檢視完整模式)
嵌入地圖GOOGLE_MAPS_MAPS_EMBED_APImode,以及模式專用參數

由 Composio 提供技術支援

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComposioHQ/-21risk-automation

Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/-2chat-automation

Automate 2chat tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/ably-automation

Automate Ably tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abstract-automation

Automate Abstract tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abuselpdb-automation

Automate Abuselpdb tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/abyssale-automation

Automate Abyssale tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accelo-automation

Automate Accelo tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/accredible-certificates-automation

Automate Accredible Certificates tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/acculynx-automation

Automate Acculynx tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/active-campaign-automation

Automate ActiveCampaign tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/addresszen-automation

Automate Addresszen tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adobe-automation

Automate Adobe tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adrapid-automation

Automate Adrapid tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/adyntel-automation

Automate Adyntel tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aeroleads-automation

Automate Aeroleads tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/aero-workflow-automation

Automate Aero Workflow tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinda-automation

Automate Affinda tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/affinity-automation

Automate Affinity tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agencyzoom-automation

Automate Agencyzoom tasks via Rube MCP (Composio). Always search tools first for current schemas.

ComposioHQ/agent-deep-links

Build, validate, and troubleshoot deep links for Codex, Cursor, VS Code, Visual Studio, and similar tools. Use when users ask for clickable links (especially in Slack) that open threads, files, folders, or app settings.

相關技能