View a markdown version of this page

如何取得管理地址名稱 - Amazon Location Service

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

如何取得管理地址名稱

使用 AddressNamesMode 設定為 Administrative傳回地址元件的官方管理名稱,例如城市名稱。 Administrative 目前僅適用於美國的地址。

潛在的使用案例

  • 地址標準化:將城市名稱標準化為資料品質的官方管理表單。

範例

Sample request
{ "QueryPosition": [-73.985, 40.748], "AddressNamesMode": "Administrative" }
Sample response
{ "ResultItems": [ { "PlaceId": "<Redacted>", "PlaceType": "PointAddress", "Title": "350 5th Ave, New York, NY 10118, United States", "Address": { "Label": "350 5th Ave, New York, NY 10118, United States", "Locality": "New York" } } ] }
cURL
curl --request POST \ --url 'https://places.geo.eu-central-1.amazonaws.com/v2/reverse-geocode?key=Your_Key' \ --header 'Content-Type: application/json' \ --data '{ "QueryPosition": [-73.985, 40.748], "AddressNamesMode": "Administrative" }'
AWS CLI
aws geo-places reverse-geocode --key ${YourKey} --query-position -73.985 40.748 --address-names-mode Administrative