특정 언어로 지오코딩하는 방법 - Amazon Location Service

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

특정 언어로 지오코딩하는 방법

이 기능을 사용하면 BCP47-compliant 코드에서 선호하는 응답 언어를 선택할 수 있습니다. 이름 변형을 기반으로 쿼리 언어를 감지하고 일치하지 않는 토큰 및 모호한 사례에 선호 언어를 사용합니다. 요청된 언어가 없는 경우 Places API는 공식 국가 언어로 결과를 제공하지만 다른 리전에서 리전 언어의 우선 순위를 지정합니다. 대체 전략으로 요청된 언어로 주소 요소를 사용할 수 없는 경우 Places APIs 기본 언어로 주소를 반환합니다.

잠재적 사용 사례

한 가지 잠재적 사용 사례는 쿼리 및/또는 결과를 현지화하는 것입니다.

예시

Sample request
{ "QueryText":"Patna, Bihar, Bharat", "Language": "HI" }
Sample response
{ "ResultItems": [ { "PlaceId": "<Redacted>", "PlaceType": "Locality", "Title": "पटना, बिहार, भारत", "Address": { "Label": "पटना, बिहार, भारत", "Country": { "Code2": "IN", "Code3": "IND", "Name": "भारत" }, "Region": { "Code": "BR", "Name": "बिहार" }, "SubRegion": { "Name": "पटना" }, "Locality": "पटना", "PostalCode": "800001" }, "Position": [ 85.13752, 25.60134 ], "MapView": [ 85.03222, 25.55157, 85.27107, 25.65917 ], "MatchScores": { "Overall": 1, "Components": { "Address": { "Country": 1, "Region": 1, "Locality": 1 } } } } ] }
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":"Patna, Bihar, Bharat", "Language": "HI" }'
AWS CLI
aws geo-places geocode --key ${YourKey} --query-text "पटना, बिहार, भारत" --language "HI"
Sample request
{ "QueryText":"पटना, बिहार, भारत" }
Sample response
{ "ResultItems": [ { "PlaceId": "<Redacted>", "PlaceType": "Locality", "Title": "Patana, Bihar, Bharat", "Address": { "Label": "Patana, Bihar, Bharat", "Country": { "Code2": "IN", "Code3": "IND", "Name": "Bharat" }, "Region": { "Code": "BR", "Name": "Bihar" }, "SubRegion": { "Name": "Patana" }, "Locality": "Patana", "PostalCode": "800001" }, "Position": [ 85.13752, 25.60134 ], "MapView": [ 85.03222, 25.55157, 85.27107, 25.65917 ], "MatchScores": { "Overall": 1, "Components": { "Address": { "Country": 1, "Region": 1, "Locality": 1 } } } } ] }
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":"पटना, बिहार, भारत" }'
AWS CLI
aws geo-places geocode --key ${YourKey} --query-text "पटना, बिहार, भारत"
Sample request
{ "QueryText":"पटना, बिहार, भारत", "Language": "HI" }
Sample response
{ "ResultItems": [ { "PlaceId": "<Redacted>", "PlaceType": "Locality", "Title": "पटना, बिहार, भारत", "Address": { "Label": "पटना, बिहार, भारत", "Country": { "Code2": "IN", "Code3": "IND", "Name": "भारत" }, "Region": { "Code": "BR", "Name": "बिहार" }, "SubRegion": { "Name": "पटना" }, "Locality": "पटना", "PostalCode": "800001" }, "Position": [ 85.13752, 25.60134 ], "MapView": [ 85.03222, 25.55157, 85.27107, 25.65917 ], "MatchScores": { "Overall": 1, "Components": { "Address": { "Country": 1, "Region": 1, "Locality": 1 } } } } ] }
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":"पटना, बिहार, भारत", "Language": "HI" }'
AWS CLI
aws geo-places geocode --key ${YourKey} --query-text "पटना, बिहार, भारत" --language "HI"