地理編碼結果包含地點的地理資訊。
JSON 表示法 |
---|
{ "place": string, "placeId": string, "location": { object ( |
欄位 | |
---|---|
place |
這個結果的完全符合規定的地點 ID。格式為「//places.googleapis.com/places/{placeID}」。詳情請參閱 https://developers.google.com/maps/documentation/places/web-service/place-id。 |
placeId |
這個結果的地點 ID。 |
location |
這個地址的 latlng。 |
granularity |
位置的精細程度。 |
viewport |
適合顯示地理編碼結果的可視區域。 |
bounds |
地址的邊界框。 |
formattedAddress |
格式正確的單行地址。 |
postalAddress |
地址的郵政地址格式。 |
addressComponents[] |
各個地區層級的重複元件。 |
postalCodeLocalities[] |
郵遞區號內含的完整縣市清單。 只有在結果的類型為「postal_code」時,才會填入這個值。 |
types[] |
此結果的類型標記組合。例如「political」和「administrative_area」。 如需可能值的完整清單,請參閱 https://developers.google.com/maps/documentation/places/web-service/place-types 中的表格 A 和表格 B。 |
plusCode |
這個地理編碼中的位置 Plus Code。 |
AddressComponent
形成格式化地址的結構化元件 (如果有這項資訊的話)。
JSON 表示法 |
---|
{ "longText": string, "shortText": string, "types": [ string ], "languageCode": string } |
欄位 | |
---|---|
longText |
地址元件的完整文字說明或名稱。舉例來說,澳洲的國家/地區地址元件長名稱為「Australia」。 |
shortText |
地址元件的縮寫文字名稱 (如有)。舉例來說,澳洲的地址元件可能有「AU」這個簡稱。 |
types[] |
這個陣列會指出地址元件的類型。 詳情請參閱 https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types。 |
languageCode |
用於格式化此元件的語言,以 CLDR 符號表示。 |
LocalizedText
特定語言的本地化文字變化版本。
JSON 表示法 |
---|
{ "text": string, "languageCode": string } |
欄位 | |
---|---|
text |
以下 |
languageCode |
文字的 BCP-47 語言代碼,例如「en-US」或「sr-Latn」。 詳情請參閱 http://www.unicode.org/reports/tr35/#Unicode_locale_identifier。 |