本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
如何使用旅遊模式進行搜尋
TravelMode 表示您的行動模式。這可改善搜尋結果的相關性。例如,當 TravelMode設為 時,搜尋「EV 充電站」會傳回適合卡車的充電站Truck。
潛在的使用案例
範例
- Sample request
-
{
"QueryText": "fuel station",
"BiasPosition": [-122.3321, 47.6062],
"TravelMode": "Truck"
}
- Sample response
-
{
"ResultItems": [
{
"PlaceId": "<Redacted>",
"PlaceType": "PointOfInterest",
"Title": "Pilot Travel Center, Seattle, WA",
"Distance": 1520
}
]
}
- cURL
-
curl --request POST \
--url 'https://places.geo.eu-central-1.amazonaws.com/v2/search-text?key=Your_Key' \
--header 'Content-Type: application/json' \
--data '{
"QueryText": "fuel station",
"BiasPosition": [-122.3321, 47.6062],
"TravelMode": "Truck"
}'
- AWS CLI
-
aws geo-places search-text --key ${YourKey} --query-text "fuel station" --bias-position -122.3321 47.6062 --travel-mode Truck
開發人員秘訣