기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.
특정 언어로 검색하는 방법
이 기능을 사용하면 BCP47-compliant 코드에서 선호하는 응답 언어를 선택할 수 있습니다. 이름 변형을 기반으로 쿼리 언어를 감지하고 일치하지 않는 토큰 및 모호한 사례에 선호 언어를 사용합니다. 요청된 언어가 없는 경우 Places API는 공식 국가 언어로 결과를 제공하지만 다른 리전에서 리전 언어의 우선 순위를 지정합니다. 대체 전략으로 요청된 언어로 주소 요소를 사용할 수 없는 경우 Places APIs 기본 언어로 주소를 반환합니다.
잠재적 사용 사례
한 가지 잠재적 사용 사례는 쿼리 및/또는 결과를 현지화하는 것입니다.
예시
요청에 "Language": "EN" 줄이 없으면 결과가 히브리어로 반환됩니다.
- Sample request
-
{ "QueryText": "Vegan", "BiasPosition":[ 34.78953, 32.08556 ], "Language": "EN" } - Sample response
-
{ "ResultItems": [ { "PlaceId": "<Redacted>", "PlaceType": "PointOfInterest", "Title": "Rainbow", "Address": { "Label": "Rainbow, Ibn Gabirol 88, 6404612 Tel Aviv-Yafo, Israel", "Country": { "Code2": "IL", "Code3": "ISR", "Name": "Israel" }, "Region": { "Code": "TA", "Name": "TA" }, "SubRegion": { "Name": "Tel Aviv" }, "Locality": "Tel Aviv-Yafo", "District": "The New North-Southern Area", "PostalCode": "6404612", "Street": "Ibn Gabirol", "StreetComponents": [ { "BaseName": "Ibn Gabirol", "Language": "he-Latn" } ], "AddressNumber": "88" }, "Position": [ 34.78149, 32.08252 ], "Distance": 829, "Categories": [ { "Id": "restaurant", "Name": "Restaurant", "LocalizedName": "Restaurant", "Primary": true }, { "Id": "fast_food", "Name": "Fast Food", "LocalizedName": "Fast Food", "Primary": false } ], "FoodTypes": [ { "LocalizedName": "Vegan", "Id": "vegan", "Primary": true }, { "LocalizedName": "Fast Food", "Id": "fast_food", "Primary": false }, { "LocalizedName": "Burgers", "Id": "burgers", "Primary": false }, { "LocalizedName": "Jewish/Kosher", "Id": "jewish/kosher", "Primary": false } ] }, { "PlaceId": "<Redacted>", "PlaceType": "PointOfInterest", "Title": "Alegria", "Address": { "Label": "Alegria, Ibn Gabirol 165, 6203305 Tel Aviv-Yafo, Israel", "Country": { "Code2": "IL", "Code3": "ISR", "Name": "Israel" }, "Region": { "Code": "TA", "Name": "TA" }, "SubRegion": { "Name": "Tel Aviv" }, "Locality": "Tel Aviv-Yafo", "District": "The Old North-Northern Area", "PostalCode": "6203305", "Street": "Ibn Gabirol", "StreetComponents": [ { "BaseName": "Ibn Gabirol", "Language": "he-Latn" } ], "AddressNumber": "165" }, "Position": [ 34.78295, 32.0923 ], "Distance": 973, "Categories": [ { "Id": "restaurant", "Name": "Restaurant", "LocalizedName": "Restaurant", "Primary": true }, { "Id": "coffee_shop", "Name": "Coffee Shop", "LocalizedName": "Coffee Shop", "Primary": false }, { "Id": "specialty_food_store", "Name": "Specialty Food Store", "LocalizedName": "Specialty Food Store", "Primary": false }, { "Id": "bakery_and_baked_goods_store", "Name": "Bakery and Baked Goods Store", "LocalizedName": "Bakery & Baked Goods Store", "Primary": false } ], "FoodTypes": [ { "LocalizedName": "Vegan", "Id": "vegan", "Primary": true } ] } ] } - cURL
-
curl --request POST \ --url 'https://places.geo.eu-central-1.amazonaws.com/v2/search-text?key=Your_Key' \ --header 'Content-Type: application/json' \ --data ' { "QueryText": "Vegan", "BiasPosition":[ 34.78953, 32.08556 ], "Language": "EN" }' - AWS CLI
-
aws geo-places search-text --key ${YourKey} --query-text "Vegan" \ --bias-position 34.78953 32.08556 \ --language "EN"
쿼리 ID를 사용하여 검색
제안 사용