Place Autocomplete 總覽

Place Autocomplete 是 Maps JavaScript API Places Library 的一項功能,在應用程式中導入後,即可在 Google 地圖搜尋欄位提供預測查詢字串。「自動完成」服務可比對完整字詞和子字串,解析地點名稱、地址和 Plus Codes。因此,應用程式可在使用者輸入內容時傳送查詢,即時提供地點預測結果。

您可使用 Place Autocomplete 小工具或 Place Autocomplete Data API,在應用程式或網頁中加入自動完成功能。

Place Autocomplete 小工具

Place Autocomplete 小工具會建立文字輸入欄位、在使用者介面選單中提供地點預測結果,以及傳回地點詳細資料,以回應使用者的選擇。使用 Place Autocomplete 小工具,在網頁上嵌入完整的獨立自動完成使用者介面。

Place Autocomplete Data API

Place Autocomplete Data API 可讓您以程式輔助方式擷取地點預測結果,比 Place Autocomplete 小工具具備更精細的控制選項。如想建構更完整的 Place Autocomplete 自訂使用者介面,請使用 Place Autocomplete Data API。