Awesome-claude-skills-cn google-maps-automation
通过 Rube MCP(Composio)自动化 Google Maps 任务:地理编码地址、搜索地点、获取路线、计算路线矩阵、反向地理编码、自动完成和获取地点详情。始终先搜索工具以获取当前架构。
install
source · Clone the upstream repo
git clone https://github.com/Athe1st3154/awesome-claude-skills-cn
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/Athe1st3154/awesome-claude-skills-cn "$T" && mkdir -p ~/.claude/skills && cp -r "$T/composio-skills/google-maps-automation" ~/.claude/skills/athe1st3154-awesome-claude-skills-cn-google-maps-automation && rm -rf "$T"
manifest:
composio-skills/google-maps-automation/SKILL.mdsource content
Google Maps Automation via Rube MCP
Geocode addresses, search places, get directions, compute distance matrices, and retrieve place details using Google Maps via Rube MCP (Composio).
工具包文档: composio.dev/toolkits/google_maps
前提条件
- Rube MCP 必须已连接(RUBE_SEARCH_TOOLS 可用)
- Active connection via
使用工具包RUBE_MANAGE_CONNECTIONSgoogle_maps - 始终首先调用
获取当前工具架构RUBE_SEARCH_TOOLS
设置
获取 Rube MCP: 在客户端配置中添加
https://rube.app/mcp 作为 MCP 服务器。 无需 API 密钥 — 只需添加端点即可使用。
- 通过确认
响应来验证 Rube MCP 可用RUBE_SEARCH_TOOLS - 使用工具包
调用google_mapsRUBE_MANAGE_CONNECTIONS - 如果连接不是 ACTIVE 状态,按照返回的授权链接完成设置
- 在运行任何工作流程前确认连接状态显示为 ACTIVE
Core Workflows
1. Geocode an Address
Use
GOOGLE_MAPS_GEOCODING_API to convert a street address into geographic coordinates (latitude/longitude).
Tool: GOOGLE_MAPS_GEOCODING_API Parameters: - address: Street address or plus code to geocode - latlng: Lat/lng for reverse geocoding (e.g., "40.714224,-73.961452") - place_id: Place ID for place geocoding - language: Language for results - region: Region bias (ccTLD code) - bounds: Bounding box for viewport bias - components: Component filter (e.g., "postal_code:94043|country:US")
2. Search for Places
Use
GOOGLE_MAPS_TEXT_SEARCH to find places using a free-text query.
Tool: GOOGLE_MAPS_TEXT_SEARCH Parameters: - textQuery (required): Search text (e.g., "restaurants in London") - fieldMask: Fields to return (e.g., "displayName,formattedAddress,rating") - maxResultCount: Max results (1-20, default 10)
3. Get Directions Between Two Locations
Use
GOOGLE_MAPS_GET_ROUTE to calculate routes with distance and duration.
Tool: GOOGLE_MAPS_GET_ROUTE Parameters: - origin_address (required): Starting point (address or "lat,lng") - destination_address (required): End point (address or "lat,lng") - travelMode: DRIVE, BICYCLE, WALK, TWO_WHEELER, or TRANSIT - routingPreference: TRAFFIC_UNAWARE, TRAFFIC_AWARE, TRAFFIC_AWARE_OPTIMAL - computeAlternativeRoutes: Return alternative routes (boolean) - units: METRIC or IMPERIAL - languageCode: BCP-47 language code - routeModifiers_avoidTolls / avoidHighways / avoidFerries: Route preferences
4. Compute Distance Matrix
Use
GOOGLE_MAPS_COMPUTE_ROUTE_MATRIX to calculate distances and durations between multiple origins and destinations.
Tool: GOOGLE_MAPS_COMPUTE_ROUTE_MATRIX Parameters: - origins (required): Array of origin locations (address strings or lat/lng objects) - destinations (required): Array of destination locations - travelMode: DRIVE, BICYCLE, WALK, TWO_WHEELER, or TRANSIT - routingPreference: TRAFFIC_UNAWARE, TRAFFIC_AWARE, TRAFFIC_AWARE_OPTIMAL - fieldMask: Response fields to include - units: METRIC or IMPERIAL
5. Get Place Details
Use
GOOGLE_MAPS_GET_PLACE_DETAILS to retrieve comprehensive information about a specific place.
Tool: GOOGLE_MAPS_GET_PLACE_DETAILS Description: Retrieves comprehensive details for a place using its resource name (places/{place_id} format). Returns hours, contacts, reviews, etc. Note: Call RUBE_SEARCH_TOOLS to get the full schema for this tool.
6. Search Nearby Places
Use
GOOGLE_MAPS_NEARBY_SEARCH to find places within a circular area around a point.
Tool: GOOGLE_MAPS_NEARBY_SEARCH Parameters: - latitude (required): Center latitude (-90 to 90) - longitude (required): Center longitude (-180 to 180) - radius (required): Search radius in meters (max 50000) - includedTypes: Place types to include (e.g., ["restaurant", "cafe"]) - excludedTypes: Place types to exclude - fieldMask: Fields to return - maxResultCount: Max results (1-20)
Common Patterns
- Geocode then route: Use
to convert addresses to coordinates, thenGOOGLE_MAPS_GEOCODING_API
for directions between them.GOOGLE_MAPS_GET_ROUTE - Search then detail: Use
to find places, thenGOOGLE_MAPS_TEXT_SEARCH
for richer metadata (hours, contacts, reviews).GOOGLE_MAPS_GET_PLACE_DETAILS - Autocomplete UX: Use
for type-ahead search suggestions as users type addresses or place names.GOOGLE_MAPS_AUTOCOMPLETE - Reverse geocode: Use
to convert coordinates back to a human-readable address.GOOGLE_MAPS_GEOCODE_LOCATION - Batch distance calculation: Use
for many-to-many distance calculations instead of callingGOOGLE_MAPS_COMPUTE_ROUTE_MATRIX
repeatedly.GOOGLE_MAPS_GET_ROUTE - Embed maps: Use
to generate embeddable map URLs for places, directions, or search results.GOOGLE_MAPS_MAPS_EMBED_API
已知陷阱
- Route matrix results structure:
returns results underGOOGLE_MAPS_COMPUTE_ROUTE_MATRIX
withdata.elements
andoriginIndex
plusdestinationIndex
anddistanceMeters
-- not aduration
structure.routes[] - Duration format:
returns durations as strings likeGOOGLE_MAPS_GET_ROUTE
inside"937s"
. You must parse these before numeric comparisons.data.response_data.routes - Place IDs for chaining: Use place identifiers returned from
when callingGOOGLE_MAPS_TEXT_SEARCH
for richer fields.GOOGLE_MAPS_GET_PLACE_DETAILS - Reverse geocoding input:
is coordinate-driven. Ensure you pass lat/lng (not an address string) to avoid mismatched lookups.GOOGLE_MAPS_GEOCODE_LOCATION - Routing preference restrictions:
cannot be set whenroutingPreference
is WALK, BICYCLE, or TRANSIT -- it must be omitted for these modes.travelMode - Nearby search type validity:
is NOT a valid type for"food"
(it is Table B). Use specific types likeGOOGLE_MAPS_NEARBY_SEARCH
,restaurant
,cafe
,bakery
instead.fast_food_restaurant - Embed API uses API keys only:
requires an API key and does not support OAuth2.GOOGLE_MAPS_MAPS_EMBED_API
快速参考
| Action | Tool | Key Parameters |
|---|---|---|
| Geocode address | | or or |
| Reverse geocode | | (see full schema via RUBE_SEARCH_TOOLS) |
| Text search | | , , |
| Nearby search | | , , , |
| Get directions | | , , |
| Distance matrix | | , , |
| Place details | | (see full schema via RUBE_SEARCH_TOOLS) |
| Autocomplete | | , , |
| Place photo | | (see full schema via RUBE_SEARCH_TOOLS) |
| Embed map | | , plus mode-specific params |
由 Composio 提供支持