本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。
如何取得管理地址名稱
使用設定為 的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