Place Autocomplete 是 Maps JavaScript API Places Library 的功能。您可以使用自動完成功能,讓應用程式具備 Google 地圖搜尋欄位中的預測查詢字串行為。「自動完成」服務可比對完整字詞和子字串,解析地點名稱、地址和 Plus Codes。因此,應用程式可在使用者輸入內容時傳送查詢,即時提供地點預測結果。
您可以使用 Place Autocomplete 小工具或 Place Autocomplete Data API,在應用程式或網頁中加入自動完成功能。
您可以使用 Place Autocomplete 小工具,在應用程式或網頁中加入自動完成功能。
Place Autocomplete 小工具
Place Autocomplete 小工具會建立文字輸入欄位、在 UI 選單中提供地點預測結果,以及傳回 Place Details 以回應使用者的選擇。使用 Place Autocomplete 小工具,在網頁中嵌入完整的獨立自動完成使用者介面。
Place Autocomplete Data API
Place Autocomplete Data API 可讓您透過程式輔助方式擷取地點預測,提供比 Place Autocomplete 小工具更精細的控制。如要為 Place Autocomplete 建構更全面的自訂使用者介面,請使用 Place Autocomplete Data API。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2026-11-10 (世界標準時間)。"],[],["Place Autocomplete offers type-ahead search capabilities for place names, addresses, and plus codes. It's available through the Place Autocomplete Widget or the Place Autocomplete Data API. The Widget creates a text input field with a UI pick list for user selection. The Data API allows for programmatic fetching of predictions, enabling custom UI development. Applications send user queries to get on-the-fly place predictions. The service is part of the Places library in the Maps JavaScript API.\n"]]