Method: geocode.places.geocodePlace

這個方法會使用地點 ID 執行地理編碼查詢。

HTTP 要求

GET https://geocode.googleapis.com/v4alpha/geocode/{place=places/*}

這個網址使用 gRPC 轉碼語法。

路徑參數

參數
place

string

必填。要進行地理編碼的地點 ID,格式為 places/{place}。

查詢參數

參數
languageCode

string

(選用步驟) 傳回結果時使用的語言。

regionCode

string

(選用步驟) 區域代碼。區碼,指定為 ccTLD (「頂層網域」) 的兩位字元值。這個參數會根據適用法律影響結果。

要求主體

要求主體必須為空白。

回應主體

如果成功,回應主體會包含 GeocodeResult 的執行個體。

授權範圍

需要下列其中一種 OAuth 範圍:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/maps-platform.geocode
  • https://www.googleapis.com/auth/maps-platform.geocode.place