本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
如何使用旅遊模式取得建議
在建議請求TravelMode中使用 ,以根據使用者的運輸模式來改善放置建議的相關性。
潛在的使用案例
範例
- Sample request
-
{
"QueryText": "parking",
"BiasPosition": [-122.3321, 47.6062],
"TravelMode": "Scooter"
}
- Sample response
-
{
"ResultItems": [
{
"Title": "Pacific Place Parking, Seattle, WA",
"SuggestResultItemType": "Place",
"Place": {
"PlaceId": "<Redacted>",
"PlaceType": "PointOfInterest",
"Distance": 830
}
}
]
}
- cURL
-
curl --request POST \
--url 'https://places.geo.eu-central-1.amazonaws.com/v2/suggest?key=Your_Key' \
--header 'Content-Type: application/json' \
--data '{
"QueryText": "parking",
"BiasPosition": [-122.3321, 47.6062],
"TravelMode": "Scooter"
}'
- AWS CLI
-
aws geo-places suggest --key ${YourKey} --query-text "parking" --bias-position -122.3321 47.6062 --travel-mode Scooter
開發人員秘訣