View a markdown version of this page

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

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

如何获取管理地址名称

使用 AddressNamesMode set to 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