本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
如何获取管理地址名称
使用设置为的address-names-mode查询参数Administrative返回地址组成部分的官方管理名称。 Administrative目前仅适用于美国的地址。
潜在使用案例
示例
- Sample request
-
https://places.geo.eu-central-1.amazonaws.com/v2/place/YourPlaceId?address-names-mode=Administrative&key=Your_Key
- Sample response
-
{
"PlaceId": "<Redacted>",
"PlaceType": "PointOfInterest",
"Title": "Empire State Building, New York, NY, United States",
"Address": {
"Label": "Empire State Building, 350 5th Ave, New York, NY 10118, United States",
"Locality": "New York"
}
}
- cURL
-
curl --request GET \
--url 'https://places.geo.eu-central-1.amazonaws.com/v2/place/YourPlaceId?address-names-mode=Administrative&key=Your_Key'
- AWS CLI
-
aws geo-places get-place --key ${YourKey} --place-id "YourPlaceId" --address-names-mode Administrative