Place Autocomplete 是 Maps JavaScript API 的 Places Library 功能。您可以運用這項功能,在應用程式中提供 Google 地圖搜尋欄位的預先輸入搜尋功能。Autocomplete 服務可比對完整字詞和子字串,解析地點名稱、地址和 Plus Codes。因此,應用程式可在使用者輸入內容時傳送查詢,即時提供地點預測結果。
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"]],["上次更新時間:2024-12-22 (世界標準時間)。"],[[["Place Autocomplete, a feature of the Places library within the Maps JavaScript API, provides a type-ahead search function similar to the Google Maps search field, matching place names, addresses, and plus codes."],["You can implement Place Autocomplete using either the Place Autocomplete Widget, which offers a pre-built UI, or the Place Autocomplete Data API, which allows for more customization."],["The Place Autocomplete Widget creates a text input with place predictions in a dropdown, returning details upon selection, ideal for a self-contained autocomplete interface on your webpage."],["The Place Autocomplete Data API enables programmatic retrieval of place predictions, granting greater flexibility for building custom user interfaces."]]],[]]