기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.
비즈니스 체인을 기반으로 근처에서 검색하는 방법
SearchNearby API를 사용하면 가까운 비즈니스 체인을 쿼리할 수 있습니다. 검색에 특정 비즈니스 체인을 포함하거나 제외할 수 있습니다. 이 기능을 사용하면 최종 사용자가 주변 지역을 탐색하고 관심 지점을 발견하는 등의 작업을 수행할 수 있습니다.
SearchNearby API를 사용하려면 다음과 같은 QueryPosition을 제공해야 합니다.
-
디바이스 위치
-
IP 기반 위치
-
맵의 뷰포트 중앙
또는 사용자가 도시 이름이나 위치를 제공할 수 있으며 애플리케이션은 해당 위치의 지역 좌표에 따라 결과를 편향시킬 수 있습니다.
지원되는 비즈니스 체인에 대한 자세한 내용은 섹션을 참조하세요비즈니스 체인 필터.
잠재적 사용 사례
-
근처의 비즈니스 살펴보기
-
가까운 B2B 고객을 찾아 비즈니스 확장
예시
다음 예제에서는 가까운 Starbucks 위치를 검색하는 방법을 보여줍니다.
- Sample request
-
이 요청은 지정된 좌표 근처의 Starbucks 위치를 검색합니다.
{
"QueryPosition": [
12.49563,
41.90325
],
"Filter" : {
"IncludeBusinessChains": ["Starbucks"]
}
}
- Sample response
-
{
"ResultItems": [
{
"PlaceId": "<Redacted>",
"PlaceType": "PointOfInterest",
"Title": "Starbucks",
"Address": {
"Label": "Starbucks, Via Giovanni Giolitti, 2, 00185 Roma RM, Italia",
"Country": {
"Code2": "IT",
"Code3": "ITA",
"Name": "Italia"
},
"Region": {
"Name": "Lazio"
},
"SubRegion": {
"Code": "RM",
"Name": "Roma"
},
"Locality": "Roma",
"District": "Esquilino",
"PostalCode": "00185",
"Street": "Via Giovanni Giolitti",
"StreetComponents": [
{
"BaseName": "Giovanni Giolitti",
"Type": "Via",
"TypePlacement": "BeforeBaseName",
"TypeSeparator": " ",
"Language": "it"
}
],
"AddressNumber": "2"
},
"Position": [
12.50102,
41.90093
],
"Distance": 515,
"Categories": [
{
"Id": "coffee_shop",
"Name": "Coffee Shop",
"LocalizedName": "Bar",
"Primary": true
}
],
"BusinessChains": [
{
"Name": "Starbucks",
"Id": "Starbucks"
}
]
}
]
}
- cURL
-
curl --request POST \
--url 'https://places.geo.eu-central-1.amazonaws.com/v2/search-nearby?key=Your_Key' \
--header 'Content-Type: application/json' \
--data '{
"QueryPosition": [
12.49563,
41.90325
],
"Filter" : {
"IncludeBusinessChains": ["Starbucks"]
}
}'
- AWS CLI
-
aws geo-places search-nearby --key ${YourKey} \
--query-position 12.49563 41.90325 \
--filter '{"IncludeBusinessChains": ["Starbucks"]}'
개발자 팁