คุณสามารถใช้การเติมข้อความค้นหาอัตโนมัติ (เดิม) เพื่อแสดงการคาดคะเนคำค้นหาสำหรับการค้นหาทางภูมิศาสตร์ตามข้อความ โดยแสดงคำค้นหาที่แนะนำขณะที่คุณพิมพ์
คำขอ Query Autocomplete (เดิม)
การเติมข้อความค้นหาอัตโนมัติ (เดิม) เป็นส่วนหนึ่งของ Places API (เดิม) และใช้คีย์ API และโควต้าร่วมกับ Places API (เดิม)
Query Autocomplete (เดิม) ช่วยให้คุณเพิ่มการคาดคะเนการค้นหาทางภูมิศาสตร์แบบเรียลไทม์ลงในแอปพลิเคชันได้ แทนที่จะค้นหาสถานที่ที่เจาะจง ผู้ใช้สามารถพิมพ์การค้นหาตามหมวดหมู่ เช่น "พิซซ่าใกล้ New York" และบริการจะตอบกลับด้วยรายการคำค้นหาที่แนะนำซึ่งตรงกับสตริง เนื่องจากการเติมข้อความอัตโนมัติในการค้นหา (เดิม) สามารถจับคู่ได้ทั้งคำเต็มและสตริงย่อย แอปพลิเคชันจึงส่งคำค้นหาขณะที่ผู้ใช้พิมพ์เพื่อแสดงการคาดคะเนได้ทันที
คำขอการเติมข้อความอัตโนมัติสำหรับการค้นหา (เดิม) คือ HTTP URL ในรูปแบบต่อไปนี้
https://maps.googleapis.com/maps/api/place/queryautocomplete/output?parameters
โดยที่ output อาจเป็น json หรือ xml ก็ได้
ต้องใช้พารามิเตอร์บางอย่างเพื่อเริ่มคำขอการเติมข้อความอัตโนมัติสำหรับการค้นหา (เดิม)
พารามิเตอร์ทั้งหมดจะแยกกันโดยใช้อักขระแอมเพอร์แซนด์ (&) ตามมาตรฐานใน URL รายการพารามิเตอร์และค่าที่เป็นไปได้จะแสดงอยู่ด้านล่าง
พารามิเตอร์ที่จำเป็น
อินพุต
สตริงข้อความที่จะค้นหา บริการ Place Autocomplete จะแสดงผลลัพธ์ที่ตรงกันซึ่งเป็นไปได้โดยอิงตามสตริงนี้ และจัดเรียงผลลัพธ์ตามความเกี่ยวข้องที่รับรู้
พารามิเตอร์ที่ไม่บังคับ
ภาษา
ภาษาที่จะแสดงผลลัพธ์
- ดูรายการภาษาที่รองรับ Google อัปเดตภาษาที่รองรับอยู่บ่อยครั้ง รายการนี้จึงอาจไม่ครอบคลุมทั้งหมด
-
หากไม่ได้ระบุ
languageไว้ API จะพยายามใช้ภาษาที่ต้องการตามที่ระบุไว้ในส่วนหัวAccept-Language - API จะพยายามอย่างเต็มที่เพื่อให้ที่อยู่ที่อ่านง่ายสำหรับทั้งผู้ใช้และคนในพื้นที่ เพื่อให้บรรลุเป้าหมายดังกล่าว ระบบจะแสดงที่อยู่ในภาษาท้องถิ่น โดยแปลงเป็นสคริปต์ที่ผู้ใช้อ่านได้หากจำเป็น ตามภาษาที่ต้องการ ส่วนที่อยู่อื่นๆ จะแสดงในภาษาที่ต้องการ คอมโพเนนต์ของที่อยู่ ทั้งหมดจะแสดงในภาษาเดียวกัน ซึ่งเลือกจากคอมโพเนนต์แรก
- หากชื่อไม่มีในภาษาที่ต้องการ API จะใช้ชื่อที่ใกล้เคียงที่สุด
- ภาษาที่ต้องการมีอิทธิพลเล็กน้อยต่อชุดผลลัพธ์ที่ API เลือกแสดงผลและลำดับการแสดงผล โปรแกรมเข้ารหัสพิกัดภูมิศาสตร์จะตีความตัวย่อแตกต่างกันไปตามภาษา เช่น ตัวย่อของประเภทถนน หรือคำพ้องความหมายที่อาจใช้ได้ในภาษาหนึ่งแต่ใช้ไม่ได้ในอีกภาษาหนึ่ง เช่น utca และ tér เป็นคำพ้องความหมายของคำว่าถนนในภาษาฮังการี
สถานที่
กำหนดจุดเป็นพิกัด latitude,longitude ที่จะค้นหาโดยรอบ
บริการ Places จะใช้ตำแหน่งเพื่อให้น้ำหนักการค้นหาเพื่อแสดงผลลัพธ์ในพื้นที่ที่กำหนดโดย location และ radius โดยระบบอาจยังคงแสดงผลลัพธ์นอกพื้นที่ที่กำหนด
location หาก query มีสถานที่ตั้งที่ชัดเจน เช่น Market in Barcelona การใช้เครื่องหมายคำพูดล้อมรอบคำค้นหาอาจส่งผลต่อน้ำหนักที่กำหนดให้กับ location และ radius ด้วย
offset
ตำแหน่งในคำที่ป้อนของอักขระสุดท้ายที่บริการใช้เพื่อจับคู่การคาดคะเน เช่น หากอินพุตคือ 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'คำขอ "Pizza near 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> ตั้งแต่ 0 รายการขึ้นไป
PlaceAutocompletePrediction
| ช่อง | ต้องระบุ | ประเภท | คำอธิบาย |
|---|---|---|---|
|
ต้องระบุ | สตริง |
มีชื่อที่มนุษย์อ่านได้สำหรับผลลัพธ์ที่แสดงผล สำหรับผลการค้นหา |
|
ต้องระบุ | Array<PlaceAutocompleteMatchedSubstring> |
รายการสตริงย่อยที่อธิบายตำแหน่งของคำที่ป้อนในข้อความผลการคาดคะเน เพื่อให้ไฮไลต์คำได้หากต้องการ ดูข้อมูลเพิ่มเติมได้ที่ PlaceAutocompleteMatchedSubstring |
|
ต้องระบุ | PlaceAutocompleteStructuredFormat |
ระบุข้อความที่จัดรูปแบบไว้ล่วงหน้าซึ่งสามารถแสดงในผลการเติมข้อความอัตโนมัติ เนื้อหานี้มีไว้เพื่อให้อ่านตามที่เป็นอยู่ อย่าแยกวิเคราะห์ที่อยู่ที่จัดรูปแบบโดยใช้โปรแกรม ดูข้อมูลเพิ่มเติมได้ที่ PlaceAutocompleteStructuredFormat |
|
ต้องระบุ | Array<PlaceAutocompleteTerm> |
มีอาร์เรย์ของคำที่ระบุแต่ละส่วนของคำอธิบายที่แสดงผล (โดยทั่วไปส่วนของคำอธิบายจะสิ้นสุดด้วยคอมมา) แต่ละรายการในอาร์เรย์มีช่อง ดูข้อมูลเพิ่มเติมได้ที่ PlaceAutocompleteTerm |
|
ไม่บังคับ | จำนวนเต็ม |
ระยะทางแบบเส้นตรงเป็นเมตรจากจุดเริ่มต้น ระบบจะแสดงผลช่องนี้เฉพาะคำขอที่ส่งด้วย |
|
ไม่บังคับ | สตริง |
ตัวระบุข้อความที่ระบุสถานที่โดยไม่ซ้ำกัน หากต้องการดึงข้อมูลเกี่ยวกับสถานที่ ให้ส่งตัวระบุนี้ในช่อง placeId ของคำขอ Places API ดูข้อมูลเพิ่มเติมเกี่ยวกับรหัสสถานที่ได้ที่ภาพรวมรหัสสถานที่ |
|
ไม่บังคับ | สตริง |
ดู place_id |
|
ไม่บังคับ | Array<string> |
มีอาร์เรย์ของประเภทที่ใช้กับสถานที่นี้ เช่น |
PlaceAutocompleteMatchedSubstring
| ช่อง | ต้องระบุ | ประเภท | คำอธิบาย |
|---|---|---|---|
|
ต้องระบุ | ตัวเลข |
ความยาวของสตริงย่อยที่ตรงกันในข้อความผลลัพธ์การคาดคะเน |
|
ต้องระบุ | ตัวเลข |
ตำแหน่งเริ่มต้นของสตริงย่อยที่ตรงกันในข้อความผลลัพธ์การคาดคะเน |
PlaceAutocompleteStructuredFormat
| ช่อง | ต้องระบุ | ประเภท | คำอธิบาย |
|---|---|---|---|
|
ต้องระบุ | สตริง |
มีข้อความหลักของการคาดคะเน ซึ่งมักจะเป็นชื่อของสถานที่ |
|
ต้องระบุ | Array<PlaceAutocompleteMatchedSubstring> |
มีอาร์เรย์ที่มีค่า ดูข้อมูลเพิ่มเติมได้ที่ PlaceAutocompleteMatchedSubstring |
|
ไม่บังคับ | สตริง |
มีข้อความรองของการคาดคะเน ซึ่งมักจะเป็นตำแหน่งของสถานที่ |
|
ไม่บังคับ | Array<PlaceAutocompleteMatchedSubstring> |
มีอาร์เรย์ที่มีค่า ดูข้อมูลเพิ่มเติมได้ที่ PlaceAutocompleteMatchedSubstring |
PlaceAutocompleteTerm
| ช่อง | ต้องระบุ | ประเภท | คำอธิบาย |
|---|---|---|---|
|
ต้องระบุ | ตัวเลข |
กำหนดตำแหน่งเริ่มต้นของคำนี้ในคำอธิบาย โดยวัดเป็นอักขระ Unicode |
|
ต้องระบุ | สตริง |
ข้อความของคำ |