Skip to content

feat: migrate to Routes API and add rich place attributes#62

Merged
cablate merged 2 commits intomainfrom
feat/routes-api-and-place-attributes
Mar 21, 2026
Merged

feat: migrate to Routes API and add rich place attributes#62
cablate merged 2 commits intomainfrom
feat/routes-api-and-place-attributes

Conversation

@cablate
Copy link
Owner

@cablate cablate commented Mar 21, 2026

Summary

  • Routes API Migration: Replace legacy Directions/Distance Matrix SDK with Routes API REST client (RoutesService.ts). planRoute now uses native waypoint optimization (up to 25 stops) instead of manual nearest-neighbor.
  • Place Attributes Expansion: Add 31 new fields to placeFieldMask — parking, dining options, atmosphere, accessibility, AI summaries. Zero additional API cost (already paying Enterprise+Atmosphere SKU via reviews).
  • Docs Consolidation: Add AI place selection research report, retire 4 stale planning docs into one consolidated backlog.

Changed Files

File Change
src/services/RoutesService.ts New — Routes API REST client
src/services/NewPlacesService.ts +31 fieldMask fields, updated transforms
src/services/PlacesSearcher.ts Routes API delegation + new field pass-through
src/services/toolclass.ts Removed legacy directions/distance-matrix code
src/tools/maps/planRoute.ts Updated description for waypoint optimization
skills/google-maps/references/tools-api.md New response field docs
docs/research-ai-place-selection.md AI place selection feasibility study
docs/backlog-and-strategy.md Consolidated backlog (replaces 4 retired docs)

New Place Details Fields

maps_place_details now returns (when available):

  • primary_type / types — precise place categorization
  • parking — free lot, street, valet, garage
  • serves — vegetarian, beer, wine, cocktails, breakfast/lunch/dinner
  • atmosphere — good for groups/children, outdoor seating, allows dogs, live music
  • dining_options — dine in, delivery, takeout, reservable
  • accessibility — wheelchair accessible parking/entrance/restroom/seating
  • editorial_summary / review_summary / generative_summary — AI summaries
  • reviews[].language — review language code

Search results (maps_search_nearby, maps_search_places) now include primary_type and price_level.

Test plan

  • npm run build — passes
  • npm test — 159 passed, 0 failed
  • Manual test: maps_place_details returns new fields for a real place
  • Manual test: maps_search_nearby returns primary_type in results

🤖 Generated with Claude Code

Routes API Migration:
- Add RoutesService.ts as dedicated Routes API REST client
- Migrate directions/distance-matrix/planRoute from legacy SDK to Routes API
- planRoute now uses native waypoint optimization (up to 25 stops)
- Update searchAlongRoute polyline extraction for Routes API format
- Remove legacy directions/distance-matrix code from toolclass.ts

Place Attributes Expansion:
- Add 31 new fields to placeFieldMask (parking, dining, atmosphere, accessibility, AI summaries)
- Zero additional API cost — already paying Enterprise+Atmosphere SKU via reviews
- Place details now return: primary_type, types, editorial_summary, parking, accessibility,
  dining_options (dine_in/delivery/takeout/reservable), serves (vegetarian/beer/wine/cocktails),
  atmosphere (good_for_groups/children/outdoor_seating/allows_dogs/live_music), payment_options,
  review_summary, generative_summary, and review language codes
- Search results now include primary_type and price_level
- comparePlaces now includes parking, serves, atmosphere, dining_options

Docs:
- Add docs/research-ai-place-selection.md (AI place selection feasibility study)
- Add docs/backlog-and-strategy.md (consolidated from 4 retired planning docs)
- Update tools-api.md with new response fields documentation
- Update architecture.md and google-maps-api-guide.md for Routes API

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cablate cablate merged commit 50c3838 into main Mar 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant