本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
如何使用出行模式获取建议
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
开发人员提示