GeocodeResult

ผลการค้นหารหัสพิกัดภูมิศาสตร์มีข้อมูลทางภูมิศาสตร์เกี่ยวกับสถานที่

การแสดง JSON
{
  "place": string,
  "placeId": string,
  "location": {
    object (LatLng)
  },
  "granularity": enum (GeocodeResult.Granularity),
  "viewport": {
    object (Viewport)
  },
  "bounds": {
    object (Viewport)
  },
  "formattedAddress": string,
  "postalAddress": {
    object (PostalAddress)
  },
  "addressComponents": [
    {
      object (GeocodeResult.AddressComponent)
    }
  ],
  "postalCodeLocalities": [
    {
      object (LocalizedText)
    }
  ],
  "types": [
    string
  ],
  "plusCode": {
    object (PlusCode)
  }
}
ช่อง
place

string

ชื่อทรัพยากรของสถานที่นี้ในรูปแบบ places/{placeId} ใช้เพื่อค้นหาสถานที่ได้

placeId

string

ตัวระบุที่ไม่ซ้ำกันของสถานที่

location

object (LatLng)

ละติจูดและลองจิจูดของที่อยู่นี้

granularity

enum (GeocodeResult.Granularity)

ความละเอียดของสถานที่

viewport

object (Viewport)

วิวพอร์ตที่เหมาะสำหรับการแสดงผลลัพธ์รหัสพิกัดภูมิศาสตร์

bounds

object (Viewport)

กรอบล้อมรอบสำหรับที่อยู่

formattedAddress

string

ที่อยู่ที่จัดรูปแบบเป็นบรรทัดเดียว

postalAddress

object (PostalAddress)

ที่อยู่ในรูปแบบที่อยู่ทางไปรษณีย์

addressComponents[]

object (GeocodeResult.AddressComponent)

คอมโพเนนต์ที่ซ้ำกันสำหรับระดับสถานที่แต่ละระดับ

postalCodeLocalities[]

object (LocalizedText)

รายการสถานที่ทั้งหมดที่อยู่ในรหัสไปรษณีย์

ระบบจะป้อนข้อมูลในช่องนี้ก็ต่อเมื่อผลลัพธ์เป็นประเภท "postal_code"

types[]

string

ชุดแท็กประเภทสำหรับผลลัพธ์นี้ เช่น "political" และ "administrative_area"

ดูรายการค่าที่เป็นไปได้ทั้งหมดได้ที่ตาราง A และตาราง B ใน https://developers.google.com/maps/documentation/places/web-service/place-types

plusCode

object (PlusCode)

รหัสพลัสของสถานที่ในผลการเข้ารหัสพิกัดภูมิศาสตร์นี้

GeocodeResult.AddressComponent

คอมโพเนนต์แบบมีโครงสร้างที่ประกอบกันเป็นที่อยู่ที่จัดรูปแบบแล้ว หากมีข้อมูลนี้

การแสดง JSON
{
  "longText": string,
  "shortText": string,
  "types": [
    string
  ],
  "languageCode": string
}
ช่อง
longText

string

คำอธิบายหรือชื่อแบบเต็มของคอมโพเนนต์ที่อยู่ เช่น คอมโพเนนต์ที่อยู่สำหรับประเทศออสเตรเลียอาจมีชื่อแบบเต็มว่า "ออสเตรเลีย"

shortText

string

ชื่อข้อความแบบย่อของคอมโพเนนต์ที่อยู่ หากมี เช่น คอมโพเนนต์ที่อยู่สำหรับประเทศออสเตรเลียอาจมีชื่อแบบย่อว่า "AU"

types[]

string

อาร์เรย์ที่ระบุประเภทของคอมโพเนนต์ที่อยู่

ดูรายละเอียดเพิ่มเติมได้ที่ https://developers.google.com/maps/documentation/geocoding/requests-geocoding#Types

languageCode

string

ภาษาที่ใช้จัดรูปแบบคอมโพเนนต์นี้ในสัญกรณ์ CLDR