Method: findNearbyPlaces
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
HTTP 要求
POST https://locationselection.googleapis.com/v1beta:findNearbyPlaces
這個網址使用 gRPC 轉碼語法。
要求主體
要求主體的資料會採用以下結構:
欄位 |
localizationPreferences |
object (LocalizationPreferences )
必要欄位。用於將回應中的文字本地化的偏好設定,例如名稱和地址。
|
searchLocation |
object (LatLng )
必要欄位。需要尋找地點的地點。
|
maxResults |
integer
必要欄位。要傳回的結果數上限。必須大於 0。
|
wifiAccessPoints[] |
object (WiFiAccessPoint )
要求位置周圍的 Wi-Fi 存取點。用於提供更高品質的搜尋結果。
|
回應主體
如果成功,回應主體會含有以下結構的資料:
JSON 表示法 |
{
"placeResults": [
{
object (PlaceResult )
}
]
} |
欄位 |
placeResults[] |
object (PlaceResult )
已找到的地點排序清單。如果在要求位置附近找不到任何地點,則為空白。排序依據為機率和距離的組合。
|
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-11-05 (世界標準時間)。
[[["容易理解","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-11-05 (世界標準時間)。"],[[["The Location Selection API's Find Nearby Places function allows you to identify places near a specified location using a POST request."],["The request body requires location preferences, search location, maximum results, and optionally, WiFi access points for enhanced accuracy."],["The response provides an ordered list of places based on likelihood and distance, which may be empty if no suitable places are found."],["gRPC Transcoding syntax is used for the HTTP request URL."]]],["The core function is to find nearby places via a `POST` request to `https://locationselection.googleapis.com/v1beta:findNearbyPlaces`. The request body requires `localizationPreferences`, `searchLocation`, and `maxResults` (an integer). Optionally, `wifiAccessPoints` can be included. The response returns a `placeResults` array, containing a list of found places, ordered by likelihood and distance. The list may be empty if no locations were found.\n"]]