보조 주소를 가져오는 방법 - Amazon Location Service

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

보조 주소를 가져오는 방법

SecondaryAddresses를 사용하면 기본 주소 아래에 있는 모든 보조 주소를 검색할 수 있습니다. 또한 내에 보조 단위가 있는 경우 도 Geocode 반환합니다QueryText.

잠재적 사용 사례

  • 주소 양식 완성: 보다 정확한 위치 정보를 포함하는 보다 정확한 보조 주소를 선택합니다.

  • 배달: 보조 주소 적용 범위가 없는 국가의 경우이 정보는 제공된 모든 단위 정보를 포함하여 배달 정보를 제공하는 데 도움이 될 수 있습니다.

예시

참고

에 대한 적용 범위는 다음 국가에서 Address.SecondaryAddressComponents 사용할 수 있습니다.

AUS, CAN, NZL, 미국, PRI

에 대한 적용 범위는 다음 국가에서 ParsedQuery.Address.SecondaryAddressComponents 사용할 수 있습니다.

AUS, AUT, BRA, CAN, ESP, FRA, GBR, IDN, IND, NZL, TUR, TWN, USA

Sample request
{ "QueryText":"910 Beach Avenue, Vancouver", "AdditionalFeatures": ["SecondaryAddresses"] }
Sample response
{ "ResultItems": [ { "PlaceId": "<Redacted>", "PlaceType": "PointAddress", "Title": "910 Beach Ave, Vancouver, BC V6Z 2W7, Canada", "Address": { "Label": "910 Beach Ave, Vancouver, BC V6Z 2W7, Canada", "Country": { "Code2": "CA", "Code3": "CAN", "Name": "Canada" }, "Region": { "Code": "BC", "Name": "British Columbia" }, "SubRegion": { "Name": "Metro Vancouver" }, "Locality": "Vancouver", "District": "Downtown Vancouver", "PostalCode": "V6Z 2W7", "Street": "Beach Ave", "StreetComponents": [ { "BaseName": "Beach", "Type": "Ave", "TypePlacement": "AfterBaseName", "TypeSeparator": " ", "Language": "en" } ], "AddressNumber": "910" }, "Position": [ -123.13325, 49.27542 ], "MapView": [ -123.13463, 49.27452, -123.13187, 49.27632 ], "MatchScores": { "Overall": 1, "Components": { "Address": { "Locality": 1, "Intersection": [ 1 ], "AddressNumber": 1 } } }, "ParsedQuery": { "Address": { "Locality": [ { "StartIndex": 18, "EndIndex": 27, "Value": "Vancouver", "QueryComponent": "Query" } ], "Street": [ { "StartIndex": 4, "EndIndex": 16, "Value": "Beach Avenue", "QueryComponent": "Query" } ], "AddressNumber": [ { "StartIndex": 0, "EndIndex": 3, "Value": "910", "QueryComponent": "Query" } ] } }, "SecondaryAddresses": [ { "PlaceId": "<Redacted>", "PlaceType": "SecondaryAddress", "Title": "101-910 Beach Ave, Vancouver, BC V6Z 2W7, Canada", "Address": { "Label": "101-910 Beach Ave, Vancouver, BC V6Z 2W7, Canada", "SecondaryAddressComponents": [ { "Number": "101" } ] }, "Position": [ -123.1334, 49.27532 ] }, { "PlaceId": "<Redacted>", "PlaceType": "SecondaryAddress", "Title": "102-910 Beach Ave, Vancouver, BC V6Z 2W7, Canada", "Address": { "Label": "102-910 Beach Ave, Vancouver, BC V6Z 2W7, Canada", "SecondaryAddressComponents": [ { "Number": "102" } ] }, "Position": [ -123.1334, 49.27532 ] }, ... ] } ] }
cURL
curl --request POST \ --url 'https://places.geo.eu-central-1.amazonaws.com/v2/geocode?key=Your_Key' \ --header 'Content-Type: application/json' \ --data '{ "QueryText":"910 Beach Avenue, Vancouver", "AdditionalFeatures": ["SecondaryAddresses"] }'
AWS CLI
aws geo-places geocode --key ${YourKey} --query-text "910 Beach Avenue, Vancouver" --additional-features "SecondaryAddresses"

이 기능에 대한 적용 범위는 AUS, AUT, BRA, CAN, ESP, FRA, GBR, IDN, IND, NZL, TUR, TWN, USA 국가에서 사용할 수 있습니다.

Sample request
{ "QueryText": "101-910 Beach Avenue, Vancouver" }
Sample response
{ "ResultItems": [ { "PlaceId": "<Redacted>", "PlaceType": "SecondaryAddress", "Title": "101-910 Beach Ave, Vancouver, BC V6Z 2W7, Canada", "Address": { "Label": "101-910 Beach Ave, Vancouver, BC V6Z 2W7, Canada", "Country": { "Code2": "CA", "Code3": "CAN", "Name": "Canada" }, "Region": { "Code": "BC", "Name": "British Columbia" }, "SubRegion": { "Name": "Metro Vancouver" }, "Locality": "Vancouver", "District": "Downtown Vancouver", "PostalCode": "V6Z 2W7", "Street": "Beach Ave", "StreetComponents": [ { "BaseName": "Beach", "Type": "Ave", "TypePlacement": "AfterBaseName", "TypeSeparator": " ", "Language": "en" } ], "AddressNumber": "910", "SecondaryAddressComponents": [ { "Number": "101" } ] }, "Position": [ -123.1334, 49.27532 ], "MapView": [ -123.13478, 49.27442, -123.13202, 49.27622 ], "MatchScores": { "Overall": 1, "Components": { "Address": { "Locality": 1, "Intersection": [ 1 ], "AddressNumber": 1, "SecondaryAddressComponents": [ { "Number": 1 } ] } } }, "ParsedQuery": { "Address": { "Locality": [ { "StartIndex": 22, "EndIndex": 31, "Value": "Vancouver", "QueryComponent": "Query" } ], "Street": [ { "StartIndex": 8, "EndIndex": 20, "Value": "Beach Avenue", "QueryComponent": "Query" } ], "AddressNumber": [ { "StartIndex": 4, "EndIndex": 7, "Value": "910", "QueryComponent": "Query" } ], "SecondaryAddressComponents": [ { "StartIndex": 0, "EndIndex": 3, "Value": "101", "Number": "101", "Designator": "unknown" } ] } }, "MainAddress": { "PlaceId": "<Redacted>", "PlaceType": "PointAddress", "Title": "910 Beach Ave, Vancouver, BC V6Z 2W7, Canada", "Address": { "Label": "910 Beach Ave, Vancouver, BC V6Z 2W7, Canada" }, "Position": [ -123.13325, 49.27542 ] } } ] }
cURL
curl --request POST \ --url 'https://places.geo.eu-central-1.amazonaws.com/v2/geocode?key=Your_Key' \ --header 'Content-Type: application/json' \ --data '{ "QueryText":"101-910 Beach Avenue, Vancouver" }'
AWS CLI
aws geo-places geocode --key ${YourKey} --query-text "101-910 Beach Avenue, Vancouver"