View a markdown version of this page

如何获取管理地址名称 - Amazon Location Service

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

如何获取管理地址名称

使用设置为的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