本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
如何使用出行模式进行搜索
TravelMode表示您的行动模式。这提高了搜索结果的相关性。例如,当设置为 “电动汽车充电站” 时TravelMode,搜索 “电动汽车充电站” 会返回适用于卡车的充电站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
开发人员提示