GeocodeResult

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

การแสดง 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.googleapis.com/places/{placeID}" ดูรายละเอียดเพิ่มเติมได้ที่ https://developers.google.com/maps/documentation/places/web-service/place-id

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"

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

plusCode

object (PlusCode)

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

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