การเติมข้อความค้นหาอัตโนมัติ (เดิม) สามารถใช้เพื่อแสดงการคาดคะเนคำค้นหา สำหรับการค้นหาทางภูมิศาสตร์แบบข้อความ โดยแสดงคำค้นหาที่แนะนำขณะที่คุณ พิมพ์
คำขอเติมคำค้นหาอัตโนมัติ (เดิม)
การเติมข้อความค้นหาอัตโนมัติ (เดิม) เป็นส่วนหนึ่งของ Places API (เดิม) และใช้ คีย์ API และโควต้าร่วมกับ Places API (เดิม)
Query Autocomplete (เดิม) ช่วยให้คุณเพิ่มการคาดคะเนคำค้นหาทางภูมิศาสตร์แบบเรียลไทม์ลงในแอปพลิเคชันได้ ผู้ใช้สามารถพิมพ์การค้นหาตามหมวดหมู่ เช่น "พิซซ่าใกล้นิวยอร์ก" แทนการค้นหาสถานที่ที่เฉพาะเจาะจง และบริการจะตอบกลับด้วยรายการคำค้นหาที่แนะนำซึ่งตรงกับสตริง เนื่องจากฟีเจอร์เติมข้อความอัตโนมัติของคำค้นหา (เดิม) สามารถจับคู่ทั้งคำแบบเต็ม และสตริงย่อยได้ แอปพลิเคชันจึงสามารถส่งคำค้นหาขณะที่ผู้ใช้พิมพ์เพื่อ ให้การคาดคะเนได้ทันที
คำขอ Query Autocomplete (เดิม) คือ HTTP URL ในรูปแบบต่อไปนี้
https://maps.googleapis.com/maps/api/place/queryautocomplete/output?parameters
โดย output อาจเป็น json หรือ xml
ต้องใช้พารามิเตอร์บางอย่างเพื่อเริ่มคำขอการเติมข้อความอัตโนมัติของคำค้นหา (เดิม)
พารามิเตอร์ทั้งหมดจะคั่นด้วยเครื่องหมายแอมเพอร์แซนด์
(&) ตามมาตรฐานใน URL รายการพารามิเตอร์และค่าที่เป็นไปได้
แสดงอยู่ด้านล่าง
พารามิเตอร์ที่จำเป็น
-
อินพุต
สตริงข้อความที่จะค้นหา บริการ Place Autocomplete จะ แสดงผลการจับคู่ที่เป็นไปได้ตามสตริงนี้ และจัดลำดับผลลัพธ์ตาม ความเกี่ยวข้องที่รับรู้
พารามิเตอร์ที่ไม่บังคับ
-
ภาษา
ภาษาที่จะแสดงผลลัพธ์
- ดู รายการภาษาที่รองรับ Google มักจะอัปเดตภาษาที่รองรับอยู่เสมอ ดังนั้นรายการนี้อาจไม่ครอบคลุมทั้งหมด
-
หากไม่ได้ระบุ
languageAPI จะพยายามใช้ภาษาที่ต้องการตามที่ระบุไว้ในส่วนหัวAccept-Language - API จะพยายามอย่างเต็มที่เพื่อให้ที่อยู่ที่อ่านง่ายสำหรับทั้งผู้ใช้และคนในพื้นที่ เพื่อให้บรรลุเป้าหมายดังกล่าว ระบบจะแสดงที่อยู่ในภาษาท้องถิ่น โดยแปลงเป็นสคริปต์ที่ผู้ใช้อ่านได้หากจำเป็น ตามภาษาที่ต้องการ ส่วนที่อยู่อื่นๆ จะแสดงในภาษาที่ต้องการ คอมโพเนนต์ของที่อยู่ ทั้งหมดจะแสดงในภาษาเดียวกัน ซึ่งเลือกจากคอมโพเนนต์แรก
- หากชื่อไม่มีในภาษาที่ต้องการ API จะใช้ชื่อที่ใกล้เคียงที่สุด
- ภาษาที่ต้องการมีผลเล็กน้อยต่อชุดผลลัพธ์ที่ API เลือกที่จะแสดงผล และลำดับที่แสดงผล Geocoder จะตีความตัวย่อแตกต่างกันไปตามภาษา เช่น ตัวย่อสำหรับประเภทถนน หรือคำพ้องความหมายที่อาจ ใช้ได้ในภาษาหนึ่งแต่ใช้ไม่ได้ในอีกภาษาหนึ่ง เช่น utca และ tér เป็นคำพ้องความหมายของถนนในภาษาฮังการี
-
สถานที่
กำหนดจุดเป็น
latitude,longitudeพิกัดที่จะค้นหา บริการ Places ใช้ตำแหน่งเพื่อให้น้ำหนักพิเศษกับการค้นหาเพื่อแสดงผลลัพธ์ใน พื้นที่ที่กำหนดโดยlocationและradiusระบบอาจยังคงแสดงผลลัพธ์ที่อยู่นอก พื้นที่ที่กำหนดระบบอาจลบล้างพารามิเตอร์locationหากqueryมีตำแหน่งที่ชัดเจน เช่นMarket in Barcelonaการใช้เครื่องหมายคำพูดรอบข้อความค้นหาอาจส่งผลต่อ น้ำหนักที่กำหนดให้กับlocationและradiusด้วย -
หักลบ
ตำแหน่งในคำที่ป้อนของอักขระสุดท้ายที่บริการ ใช้เพื่อจับคู่การคาดคะเน เช่น หากอินพุตคือ
Googleและออฟเซ็ตคือ 3 บริการจะจับคู่กับGooสตริงที่กำหนดโดยออฟเซ็ตจะจับคู่กับ คำแรกในคำค้นหาที่ป้อนเท่านั้น เช่น หากคำที่ป้อนคือGoogle abcและออฟเซ็ตคือ 3 บริการจะพยายาม จับคู่กับGoo abcหากไม่ได้ระบุออฟเซ็ต บริการ จะใช้ทั้งคำ โดยทั่วไปแล้ว ควรตั้งค่าออฟเซ็ตเป็นตำแหน่งของเคอร์เซอร์ข้อความ -
รัศมี
กำหนดระยะทาง (เป็นเมตร) ที่จะแสดงผลลัพธ์ของสถานที่ คุณ อาจทำให้ผลลัพธ์เอนเอียงไปยังวงกลมที่ระบุได้โดยการส่งพารามิเตอร์
locationและradiusการทำเช่นนี้จะสั่งให้บริการ Places แสดงผลลัพธ์ภายในวงกลมนั้นต่อไป และอาจยังแสดงผลลัพธ์ที่อยู่นอกพื้นที่ที่กำหนดระบบจะจำกัดรัศมีโดยอัตโนมัติให้มีค่าสูงสุดตาม ประเภทการค้นหาและพารามิเตอร์อื่นๆ
- เติมข้อความอัตโนมัติ: 50,000 เมตร
-
การค้นหาในบริเวณใกล้เคียง
- ด้วย
keywordหรือname: 50,000 เมตร -
ไม่มี
keywordหรือname-
สูงสุด 50,000 เมตร ปรับแบบไดนามิกตามความหนาแน่นของพื้นที่
โดยไม่ขึ้นอยู่กับพารามิเตอร์
rankby -
เมื่อใช้
rankby=distanceระบบจะไม่ยอมรับพารามิเตอร์รัศมี และจะส่งผลให้เกิดINVALID_REQUEST
-
สูงสุด 50,000 เมตร ปรับแบบไดนามิกตามความหนาแน่นของพื้นที่
โดยไม่ขึ้นอยู่กับพารามิเตอร์
- ด้วย
- การเติมคำค้นหาอัตโนมัติ: 50,000 เมตร
- การค้นหาข้อความ: 50,000 เมตร
ตัวอย่างการเติมคำค้นหาอัตโนมัติ (เดิม)
URL
https://maps.googleapis.com/maps/api/place/queryautocomplete/json ?input=pizza%20near%20par &key=YOUR_API_KEY
curl
curl -L -X GET 'https://maps.googleapis.com/maps/api/place/queryautocomplete/json?input=pizza%20near%20par&key=YOUR_API_KEY'คำขอ "พิซซ่าใกล้ Par" ที่มีผลลัพธ์เป็นภาษาฝรั่งเศส
URL
https://maps.googleapis.com/maps/api/place/queryautocomplete/json ?input=pizza%20near%20par &language=fr &key=YOUR_API_KEY
curl
curl -L -X GET 'https://maps.googleapis.com/maps/api/place/queryautocomplete/json?input=pizza%20near%20par&language=fr&key=YOUR_API_KEY'โปรดทราบว่าคุณจะต้องแทนที่ คีย์ API ในตัวอย่างเหล่านี้ด้วยคีย์ของคุณเอง
การตอบกลับการเติมข้อความค้นหาอัตโนมัติ (เดิม)
ระบบจะแสดงคำตอบของฟีเจอร์เติมข้อความอัตโนมัติในการค้นหา (เดิม) ในรูปแบบที่ระบุโดยแฟล็ก output ภายในเส้นทางของคำขอ URL ผลลัพธ์ด้านล่าง
จะแสดงสำหรับการค้นหาที่มีพารามิเตอร์ต่อไปนี้
URL
https://maps.googleapis.com/maps/api/place/queryautocomplete/json ?input=pizza%20near%20par &key=YOUR_API_KEY
curl
curl -L -X GET 'https://maps.googleapis.com/maps/api/place/queryautocomplete/json?input=pizza%20near%20par&key=YOUR_API_KEY'JSON
{ "predictions": [ { "description": "pizza near Paris, France", "matched_substrings": [{ "length": 5, "offset": 0 }, { "length": 3, "offset": 11 }], "structured_formatting": { "main_text": "pizza", "main_text_matched_substrings": [{ "length": 5, "offset": 0 }], "secondary_text": "near Paris, France", "secondary_text_matched_substrings": [{ "length": 3, "offset": 5 }], }, "terms": [ { "offset": 0, "value": "pizza" }, { "offset": 6, "value": "near" }, { "offset": 11, "value": "Paris" }, { "offset": 18, "value": "France" }, ], }, { "description": "pizza near Pari Chowk, NRI City, Omega II, Noida, Uttar Pradesh, India", "matched_substrings": [{ "length": 5, "offset": 0 }, { "length": 3, "offset": 11 }], "structured_formatting": { "main_text": "pizza", "main_text_matched_substrings": [{ "length": 5, "offset": 0 }], "secondary_text": "near Pari Chowk, NRI City, Omega II, Noida, Uttar Pradesh, India", "secondary_text_matched_substrings": [{ "length": 3, "offset": 5 }], }, "terms": [ { "offset": 0, "value": "pizza" }, { "offset": 6, "value": "near" }, { "offset": 11, "value": "Pari Chowk" }, { "offset": 23, "value": "NRI City" }, { "offset": 33, "value": "Omega II" }, { "offset": 43, "value": "Noida" }, { "offset": 50, "value": "Uttar Pradesh" }, { "offset": 65, "value": "India" }, ], }, { "description": "pizza near Disneyland Park, Disneyland Drive, Anaheim, CA, USA", "matched_substrings": [{ "length": 5, "offset": 0 }, { "length": 3, "offset": 22 }], "structured_formatting": { "main_text": "pizza", "main_text_matched_substrings": [{ "length": 5, "offset": 0 }], "secondary_text": "near Disneyland Park, Disneyland Drive, Anaheim, CA, USA", "secondary_text_matched_substrings": [{ "length": 3, "offset": 16 }], }, "terms": [ { "offset": 0, "value": "pizza" }, { "offset": 6, "value": "near" }, { "offset": 11, "value": "Disneyland Park" }, { "offset": 28, "value": "Disneyland Drive" }, { "offset": 46, "value": "Anaheim" }, { "offset": 55, "value": "CA" }, { "offset": 59, "value": "USA" }, ], }, { "description": "pizza near Cathédrale Notre-Dame de Paris, Parvis Notre-Dame - place Jean-Paul-II, Paris, France", "matched_substrings": [{ "length": 5, "offset": 0 }, { "length": 3, "offset": 36 }], "structured_formatting": { "main_text": "pizza", "main_text_matched_substrings": [{ "length": 5, "offset": 0 }], "secondary_text": "near Cathédrale Notre-Dame de Paris, Parvis Notre-Dame - place Jean-Paul-II, Paris, France", "secondary_text_matched_substrings": [{ "length": 3, "offset": 30 }], }, "terms": [ { "offset": 0, "value": "pizza" }, { "offset": 6, "value": "near" }, { "offset": 11, "value": "Cathédrale Notre-Dame de Paris" }, { "offset": 43, "value": "Parvis Notre-Dame - place Jean-Paul-II" }, { "offset": 83, "value": "Paris" }, { "offset": 90, "value": "France" }, ], }, { "description": "pizza near Paris Beauvais Airport, Route de l'Aéroport, Tillé, France", "matched_substrings": [{ "length": 5, "offset": 0 }, { "length": 3, "offset": 11 }], "structured_formatting": { "main_text": "pizza", "main_text_matched_substrings": [{ "length": 5, "offset": 0 }], "secondary_text": "near Paris Beauvais Airport, Route de l'Aéroport, Tillé, France", "secondary_text_matched_substrings": [{ "length": 3, "offset": 5 }], }, "terms": [ { "offset": 0, "value": "pizza" }, { "offset": 6, "value": "near" }, { "offset": 11, "value": "Paris Beauvais Airport" }, { "offset": 35, "value": "Route de l'Aéroport" }, { "offset": 56, "value": "Tillé" }, { "offset": 63, "value": "France" }, ], }, ], "status": "OK", }
XML
<AutocompletionResponse> <status>OK</status> <prediction> <description>pizza near Paris, France</description> <term> <value>pizza</value> <offset>0</offset> </term> <term> <value>near</value> <offset>6</offset> </term> <term> <value>Paris</value> <offset>11</offset> </term> <term> <value>France</value> <offset>18</offset> </term> <matched_substring> <offset>0</offset> <length>5</length> </matched_substring> <matched_substring> <offset>11</offset> <length>3</length> </matched_substring> <structured_formatting> <description>pizza</description> <subdescription>near Paris, France</subdescription> <description_matched_substring> <offset>0</offset> <length>5</length> </description_matched_substring> <subdescription_matched_substring> <offset>5</offset> <length>3</length> </subdescription_matched_substring> </structured_formatting> </prediction> <prediction> <description>pizza near Pari Chowk, NRI City, Omega II, Noida, Uttar Pradesh, India</description> <term> <value>pizza</value> <offset>0</offset> </term> <term> <value>near</value> <offset>6</offset> </term> <term> <value>Pari Chowk</value> <offset>11</offset> </term> <term> <value>NRI City</value> <offset>23</offset> </term> <term> <value>Omega II</value> <offset>33</offset> </term> <term> <value>Noida</value> <offset>43</offset> </term> <term> <value>Uttar Pradesh</value> <offset>50</offset> </term> <term> <value>India</value> <offset>65</offset> </term> <matched_substring> <offset>0</offset> <length>5</length> </matched_substring> <matched_substring> <offset>11</offset> <length>3</length> </matched_substring> <structured_formatting> <description>pizza</description> <subdescription>near Pari Chowk, NRI City, Omega II, Noida, Uttar Pradesh, India</subdescription> <description_matched_substring> <offset>0</offset> <length>5</length> </description_matched_substring> <subdescription_matched_substring> <offset>5</offset> <length>3</length> </subdescription_matched_substring> </structured_formatting> </prediction> <prediction> <description>pizza near Disneyland Park, Disneyland Drive, Anaheim, CA, USA</description> <term> <value>pizza</value> <offset>0</offset> </term> <term> <value>near</value> <offset>6</offset> </term> <term> <value>Disneyland Park</value> <offset>11</offset> </term> <term> <value>Disneyland Drive</value> <offset>28</offset> </term> <term> <value>Anaheim</value> <offset>46</offset> </term> <term> <value>CA</value> <offset>55</offset> </term> <term> <value>USA</value> <offset>59</offset> </term> <matched_substring> <offset>0</offset> <length>5</length> </matched_substring> <matched_substring> <offset>22</offset> <length>3</length> </matched_substring> <structured_formatting> <description>pizza</description> <subdescription>near Disneyland Park, Disneyland Drive, Anaheim, CA, USA</subdescription> <description_matched_substring> <offset>0</offset> <length>5</length> </description_matched_substring> <subdescription_matched_substring> <offset>16</offset> <length>3</length> </subdescription_matched_substring> </structured_formatting> </prediction> <prediction> <description>pizza near Cathédrale Notre-Dame de Paris, Parvis Notre-Dame - place Jean-Paul-II, Paris, France</description> <term> <value>pizza</value> <offset>0</offset> </term> <term> <value>near</value> <offset>6</offset> </term> <term> <value>Cathédrale Notre-Dame de Paris</value> <offset>11</offset> </term> <term> <value>Parvis Notre-Dame - place Jean-Paul-II</value> <offset>43</offset> </term> <term> <value>Paris</value> <offset>83</offset> </term> <term> <value>France</value> <offset>90</offset> </term> <matched_substring> <offset>0</offset> <length>5</length> </matched_substring> <matched_substring> <offset>36</offset> <length>3</length> </matched_substring> <structured_formatting> <description>pizza</description> <subdescription>near Cathédrale Notre-Dame de Paris, Parvis Notre-Dame - place Jean-Paul-II, Paris, France</subdescription> <description_matched_substring> <offset>0</offset> <length>5</length> </description_matched_substring> <subdescription_matched_substring> <offset>30</offset> <length>3</length> </subdescription_matched_substring> </structured_formatting> </prediction> <prediction> <description>pizza near Paris Beauvais Airport, Route de l'Aéroport, Tillé, France</description> <term> <value>pizza</value> <offset>0</offset> </term> <term> <value>near</value> <offset>6</offset> </term> <term> <value>Paris Beauvais Airport</value> <offset>11</offset> </term> <term> <value>Route de l'Aéroport</value> <offset>35</offset> </term> <term> <value>Tillé</value> <offset>56</offset> </term> <term> <value>France</value> <offset>63</offset> </term> <matched_substring> <offset>0</offset> <length>5</length> </matched_substring> <matched_substring> <offset>11</offset> <length>3</length> </matched_substring> <structured_formatting> <description>pizza</description> <subdescription>near Paris Beauvais Airport, Route de l'Aéroport, Tillé, France</subdescription> <description_matched_substring> <offset>0</offset> <length>5</length> </description_matched_substring> <subdescription_matched_substring> <offset>5</offset> <length>3</length> </subdescription_matched_substring> </structured_formatting> </prediction> </AutocompletionResponse>
เมื่อบริการ Places แสดงผลลัพธ์ JSON จากการค้นหา ระบบจะวางผลลัพธ์เหล่านั้นไว้ภายในอาร์เรย์ predictions แม้ว่าบริการจะไม่แสดงผลลัพธ์ (เช่น หาก location อยู่ระยะไกล) แต่ก็จะยังแสดงผลอาร์เรย์ predictions ที่ว่างเปล่า การตอบกลับ XML ประกอบด้วยองค์ประกอบ <prediction> ตั้งแต่ 0 รายการขึ้นไป
PlacesQueryAutocompleteResponse
| ช่อง | ต้องระบุ | ประเภท | คำอธิบาย |
|---|---|---|---|
|
ต้องระบุ | Array<PlaceAutocompletePrediction> |
มีอาร์เรย์ของการคาดการณ์ ดูข้อมูลเพิ่มเติมได้ที่ PlaceAutocompletePrediction |
|
ต้องระบุ | PlacesAutocompleteStatus |
มีสถานะของคำขอ และอาจมีข้อมูลการแก้ไขข้อบกพร่อง เพื่อช่วยคุณติดตามหาสาเหตุที่คำขอไม่สำเร็จ ดูข้อมูลเพิ่มเติมได้ที่ PlacesAutocompleteStatus |
|
ไม่บังคับ | สตริง |
เมื่อบริการแสดงรหัสสถานะอื่นที่ไม่ใช่ |
|
ไม่บังคับ | Array<string> |
เมื่อบริการแสดงข้อมูลเพิ่มเติมเกี่ยวกับข้อกำหนดของคำขอ อาจมี |
PlacesAutocompleteStatus
รหัสสถานะที่บริการส่งกลับ
OKซึ่งหมายความว่าคำขอ API สำเร็จ-
ZERO_RESULTSซึ่งหมายความว่าการค้นหาสำเร็จแต่ ไม่พบผลลัพธ์ ปัญหานี้อาจเกิดขึ้นหากการค้นหามีขอบเขตใน สถานที่ตั้งระยะไกล -
INVALID_REQUESTซึ่งบ่งชี้ว่าคำขอ API มีรูปแบบไม่ถูกต้อง โดยทั่วไปเกิดจากไม่มีพารามิเตอร์input -
OVER_QUERY_LIMITที่ระบุข้อมูลต่อไปนี้- คุณส่งคำขอเกินขีดจำกัด QPS
- บัญชีของคุณไม่ได้เปิดใช้การเรียกเก็บเงิน
- ใช้เครดิต $200 รายเดือนหรือโควต้าการใช้งานที่กำหนดเองเกินแล้ว
- วิธีการชำระเงินที่ระบุใช้ไม่ได้อีกต่อไป (เช่น บัตรเครดิตหมดอายุ)
-
REQUEST_DENIEDซึ่งระบุว่าคำขอของคุณถูกปฏิเสธ โดยทั่วไปเนื่องจากสาเหตุต่อไปนี้- คำขอไม่มีคีย์ API
- พารามิเตอร์
keyไม่ถูกต้อง
UNKNOWN_ERRORแสดงว่าเกิดข้อผิดพลาดที่ไม่รู้จัก
เมื่อบริการ Places แสดงผลลัพธ์ JSON จากการค้นหา ระบบจะวางผลลัพธ์เหล่านั้นไว้
ภายในpredictionsอาร์เรย์ แม้ว่าบริการจะไม่แสดงผลลัพธ์ (เช่น หาก location อยู่ระยะไกล) บริการก็จะยังแสดงผลอาร์เรย์ predictions ที่ว่างเปล่า การตอบกลับ XML ประกอบด้วย
องค์ประกอบ <prediction> อย่างน้อย 1 รายการ
PlaceAutocompletePrediction
| ช่อง | ต้องระบุ | ประเภท | คำอธิบาย |
|---|---|---|---|
|
ต้องระบุ | สตริง |
มีชื่อที่มนุษย์อ่านได้สำหรับผลลัพธ์ที่แสดง สำหรับ
|
|
ต้องระบุ | อาร์เรย์<PlaceAutocompleteMatchedSubstring> |
รายการสตริงย่อยที่อธิบายตำแหน่งของคำที่ป้อน ในข้อความผลการคาดคะเน เพื่อให้สามารถไฮไลต์คำได้ หากต้องการ ดูข้อมูลเพิ่มเติมได้ที่ PlaceAutocompleteMatchedSubstring |
|
ต้องระบุ | PlaceAutocompleteStructuredFormat |
ระบุข้อความที่จัดรูปแบบไว้ล่วงหน้าซึ่งแสดงในผลการค้นหาที่มีการเติมข้อความอัตโนมัติ ได้ เนื้อหานี้มีไว้ให้อ่านตามที่แสดง อย่าแยกวิเคราะห์ที่อยู่ที่จัดรูปแบบแล้วแบบเป็นโปรแกรม ดูข้อมูลเพิ่มเติมได้ที่ PlaceAutocompleteStructuredFormat |
|
ต้องระบุ | อาร์เรย์<PlaceAutocompleteTerm> |
มีอาร์เรย์ของคำที่ระบุแต่ละส่วนของคำอธิบายที่ส่งคืน (โดยทั่วไปแล้วส่วนของคำอธิบายจะสิ้นสุดด้วยเครื่องหมายคอมมา) แต่ละรายการในอาร์เรย์มีฟิลด์
ดูข้อมูลเพิ่มเติมได้ที่ PlaceAutocompleteTerm |
|
ไม่บังคับ | จำนวนเต็ม |
ระยะทางเป็นเส้นตรงจากต้นทางเป็นเมตร ระบบจะแสดงฟิลด์นี้
เฉพาะคำขอที่ทำด้วย |
|
ไม่บังคับ | สตริง |
ตัวระบุที่เป็นข้อความซึ่งระบุสถานที่ที่ไม่ซ้ำกัน หากต้องการดึงข้อมูลเกี่ยวกับสถานที่ ให้ส่งตัวระบุนี้ในฟิลด์ placeId ของคำขอ Places API ดูข้อมูลเพิ่มเติมเกี่ยวกับรหัสสถานที่ได้ที่ภาพรวมรหัสสถานที่ |
|
ไม่บังคับ | สตริง |
ดู place_id |
|
ไม่บังคับ | Array<string> |
มีอาร์เรย์ของประเภทที่ใช้กับสถานที่นี้ เช่น
|
PlaceAutocompleteMatchedSubstring
| ช่อง | ต้องระบุ | ประเภท | คำอธิบาย |
|---|---|---|---|
|
ต้องระบุ | ตัวเลข |
ความยาวของสตริงย่อยที่ตรงกันในข้อความผลการคาดการณ์ |
|
ต้องระบุ | ตัวเลข |
ตำแหน่งเริ่มต้นของสตริงย่อยที่ตรงกันในข้อความผลการคาดคะเน |
PlaceAutocompleteStructuredFormat
| ช่อง | ต้องระบุ | ประเภท | คำอธิบาย |
|---|---|---|---|
|
ต้องระบุ | สตริง |
มีข้อความหลักของการคาดคะเน ซึ่งมักจะเป็นชื่อของ สถานที่ |
|
ต้องระบุ | อาร์เรย์<PlaceAutocompleteMatchedSubstring> |
มีอาร์เรย์ที่มีค่า ดูข้อมูลเพิ่มเติมได้ที่ PlaceAutocompleteMatchedSubstring |
|
ไม่บังคับ | สตริง |
มีข้อความรองของการคาดคะเน ซึ่งมักจะเป็นสถานที่ตั้งของ สถานที่ |
|
ไม่บังคับ | อาร์เรย์<PlaceAutocompleteMatchedSubstring> |
มีอาร์เรย์ที่มีค่า ดูข้อมูลเพิ่มเติมได้ที่ PlaceAutocompleteMatchedSubstring |
PlaceAutocompleteTerm
| ช่อง | ต้องระบุ | ประเภท | คำอธิบาย |
|---|---|---|---|
|
ต้องระบุ | ตัวเลข |
กำหนดตำแหน่งเริ่มต้นของคำนี้ในคำอธิบาย โดยวัดเป็นอักขระ Unicode |
|
ต้องระบุ | สตริง |
ข้อความของคำ |