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

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

보조 주소를 가져오는 방법

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

해당 국가에 ParsedQuery.Address.SecondaryAddressComponents대해 구문 분석된 쿼리 지원이 있는 경우 장소 유형이 인 결과 항목이 반환될 InferredSecondaryAddress 수 있습니다. InferredSecondaryAddress 결과는 쿼리에 제공된 데이터를 기반으로 반환됩니다.

잠재적 사용 사례

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

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

예제

참고

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

AUS, CAN, NZL, USA, PRI

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

AUS, AUT, BRA, CAN, ESP, FRA, GBR, HKG, 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"