미리보기 버전에서 이전
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Routes API는 2022년 9월에 공개 미리보기 (GA 전)로 출시되었습니다. GA 이전 버전 제품 또는 서비스에는 Google Maps Platform 서비스별 약관이 적용됩니다.
자세한 내용은 출시 단계 설명을 참조하세요.
이 섹션에서는 앱을 미리보기 버전에서 정식 버전으로 이전하는 방법을 설명합니다.
정식 버전에 추가된 새로운 기능
GA 출시에는 미리보기에 포함되지 않은 다음과 같은 새로운 기능이 추가되었습니다.
이제 장소 ID 및 위도/경도 좌표와 함께 다음을 사용하여 GA 출시에서 위치를 지정할 수 있습니다.
주소 문자열 ('Chicago, IL' 또는 'Darwin, NT, Australia')
주소 문자열은 사용자가 주소를 입력하는 방식인 경우가 많습니다. 하지만 {product_name}은 경로를 계산하기 전에 먼저 주소 문자열을 내부적으로 지오코딩하여 위도/경도 좌표로 변환해야 합니다.
또한 특정 지리적 지역의 지오코딩된 결과를 반환하도록 지정할 수 있는 regionCode
요청 매개변수 지원이 추가되었습니다.
Plus Codes
플러스 코드는 실제 주소가 없는 사람이나 장소의 상세 주소와 같습니다. 도로명과 번호가 포함된 주소 대신 플러스 코드는 위도와 경도를 기반으로 하며 숫자와 문자로 표시됩니다.
이제 경로 계산 응답에 geocodingResults
배열이 포함됩니다. 주소 문자열 또는 플러스 코드로 지정된 요청의 모든 위치 (출발지, 목적지 또는 중간 경유지)에 대해 API는 장소 ID 조회를 실행합니다. 이 배열의 각 요소에는 위치에 해당하는 장소 ID와 위치에 관한 추가 메타데이터가 포함됩니다. 요청에서 장소 ID 또는 위도/경도 좌표로 지정된 위치는 무시됩니다.
기존 미리보기 기능 변경사항
이제 요청에 새 배열 extraComputations
필드를 추가하여 GA에서 다음 기능을 명시적으로 사용 설정해야 합니다.
미리보기 출시에서는 필드 마스크를 사용하여 대답에서 이러한 기능의 정보를 반환하도록 지정했습니다. 이제 다음 두 가지를 모두 충족해야 합니다.
- 새
extraComputations
배열 요청 매개변수를 설정하여 이러한 기능을 사용 설정합니다.
- 필드 마스크를 설정하여 응답에 정보를 반환하도록 지정합니다.
알아두어야 할 사항은 무엇인가요?
다음 필드는 extraComputations
를 설정하여 명시적으로 사용 설정하지 않는 한 더 이상 computeRouteMatrix 응답에 포함되지 않습니다.
travelAdvisory.tollInfo
(통행료 정보)
extraComputations
를 설정하여 명시적으로 사용 설정하지 않는 한 다음 필드는 더 이상 computeRoutes 응답에 포함되지 않습니다.
routes.legs.travelAdvisory.tollInfo
(통행료 정보)
routes.travelAdvisory.tollInfo
(통행료 정보)
routes.travelAdvisory.fuelConsumptionMicroliters
(연료 소비)
routes.travelAdvisory.speedReadingIntervals
(다중선의 교통정보)
routes.legs.travelAdvisory.speedReadingIntervals
(다중선의 교통정보)
어떤 조치를 취해야 하나요?
폴리라인의 통행료 정보, 연료 소비량 또는 교통정보에 대한 응답 필드를 수신하려면 새 요청 배열 필드 extraComputations
를 설정하여 다음 값 중 하나 이상을 포함해야 합니다.
통행료 정보를 수신하려면 새 extraComputations
배열 필드를 "TOLLS"
로 설정하세요.
연료 소비량을 수신하려면 새 extraComputations
배열 필드를 "FUEL_CONSUMPTION"
로 설정합니다.
다중선의 교통정보를 수신하려면 새 extraComputations
배열 필드를 "TRAFFIC_ON_POLYLINE"
로 설정하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-22(UTC)
[null,null,["최종 업데이트: 2025-07-22(UTC)"],[[["\u003cp\u003eThe Routes API has transitioned from Preview to General Availability (GA), introducing new features and changes to existing ones.\u003c/p\u003e\n"],["\u003cp\u003eYou can now specify locations using address strings and Plus Codes in addition to place IDs and coordinates.\u003c/p\u003e\n"],["\u003cp\u003eToll info, fuel consumption, and traffic on a polyline now require explicit enablement using the \u003ccode\u003eextraComputations\u003c/code\u003e field in requests.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egeocodingResults\u003c/code\u003e array has been added to the response, providing place IDs and metadata for locations specified as address strings or Plus Codes.\u003c/p\u003e\n"],["\u003cp\u003eExisting implementations relying on implicit inclusion of toll info, fuel consumption, or traffic on a polyline data need to be updated to utilize the \u003ccode\u003eextraComputations\u003c/code\u003e field.\u003c/p\u003e\n"]]],["The Routes API's GA release introduces new location specification options, including address strings and Plus Codes, and includes a `geocodingResults` array in the response. To enable toll info, fuel consumption, and traffic on a polyline, users must now set the `extraComputations` array in their requests. `extraComputations` values are \"TOLLS\", \"FUEL_CONSUMPTION\", and \"TRAFFIC_ON_POLYLINE\". The field mask must still be used. Certain fields will be omitted in the response unless enabled by `extraComputations`.\n"],null,["# Migrate from the Preview release\n\n**European Economic Area (EEA) developers** If your billing address is in the European Economic Area, effective on 8 July 2025, the [Google Maps Platform EEA Terms of Service](https://cloud.google.com/terms/maps-platform/eea) will apply to your use of the Services. Functionality varies by region. [Learn more](/maps/comms/eea/faq).\n\nThe Routes API was released as a public Preview (pre-GA) in September of\n2022. Pre-GA Offerings are covered by the [Google Maps Platform Service Specific\nTerms](https://cloud.google.com/maps-platform/terms/maps-service-terms).\nFor more information, see the [launch stage descriptions](/maps/launch-stages).\n\nThis section describes how to migrate an app from the Preview release to the GA\nrelease.\n\nNew features added to the GA release\n------------------------------------\n\nThe GA release adds the following new features that were not included in the\nPreview:\n\n- Along with place IDs and latitude/longitude coordinates, you can now\n [specify a location](/maps/documentation/routes/specify_location) in the GA release by using:\n\n - [Address strings](/maps/documentation/routes/specify_location#text_string) (\"Chicago, IL\" or\n \"Darwin, NT, Australia\")\n\n Address strings are often how a user inputs an address. However,\n {product_name} must first geocode the address string internally to convert\n it to latitude/longitude coordinates before it can calculate a route.\n\n In addition, support for the `regionCode` request parameter has been\n added, which lets you specify to return geocoded results for a specific\n geographic region.\n - [Plus Codes](/maps/documentation/routes/specify_location#plus_code)\n\n Plus Codes are like street addresses for people or places that don't\n have an actual address. Instead of addresses with street names and\n numbers, Plus Codes are based on latitude and longitude, and are\n displayed as numbers and letters.\n- The [compute routes response](/maps/documentation/routes/understand-route-response) now contains the\n `geocodingResults` array. For every location in the request (origin,\n destination, or intermediate waypoint) that was specified as an **address\n string** or as a **Plus code**, the API performs a place ID lookup. Each\n element of this array contains the place ID corresponding to a location\n along with additional metadata about the location. Locations in the request\n specified as a place ID or as latitude/longiiture coordinates are ignored.\n\nChanges to existing Preview features\n------------------------------------\n\nYou must now explicitly enable the following features in the GA by\nadding the new array `extraComputations` field to the request:\n\n- [Toll info](/maps/documentation/routes/calculate_toll_fees)\n\n- [Fuel consumption](/maps/documentation/routes/eco-routes)\n\n- [Traffic on a polyline](/maps/documentation/routes/traffic_on_polylines)\n\nIn the Preview release, you used a [field mask](/maps/documentation/routes/choose_fields) to specify to\nreturn information for these features in the response. Now, you must both:\n\n- Set the new `extraComputations` array request parameter to enable these features.\n- Set a field mask to specify to return the information in the response.\n\n### What do I need to know?\n\nThe following fields will no longer be included in\n[computeRouteMatrix responses](/maps/documentation/routes/reference/rest/v2/TopLevel/computeRouteMatrix#response-body)\nunless explicitly enabled by setting `extraComputations`:\n\n- `travelAdvisory.tollInfo` (Toll info)\n\nThe following fields will no longer be included in\n[computeRoutes responses](/maps/documentation/routes/reference/rest/v2/TopLevel/computeRoutes#response-body)\nunless explicitly enabled by setting `extraComputations`:\n\n- `routes.legs.travelAdvisory.tollInfo`(Toll info)\n- `routes.travelAdvisory.tollInfo`(Toll info)\n- `routes.travelAdvisory.fuelConsumptionMicroliters`(Fuel consumption)\n- `routes.travelAdvisory.speedReadingIntervals`(Traffic on a polyline)\n- `routes.legs.travelAdvisory.speedReadingIntervals`(Traffic on a polyline)\n\n### What do I need to do?\n\nTo receive the response fields for toll info, fuel consumption, or traffic on a\npolyline, you must set the new request array field, `extraComputations`, to\ninclude one or more of the following values:\n\n- To receive [toll info](/maps/documentation/routes/calculate_toll_fees), set the new\n `extraComputations` array field to `\"TOLLS\"`.\n\n- To receive [fuel consumption](/maps/documentation/routes/eco-routes), set the new `extraComputations`\n array field to `\"FUEL_CONSUMPTION\"`.\n\n- To receive [traffic information on polylines](/maps/documentation/routes/traffic_on_polylines), set the\n new `extraComputations` array field to `\"TRAFFIC_ON_POLYLINE\"`."]]