翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。
ビジネスチェーンに基づいて近くの を検索する方法
SearchNearby API を使用すると、近くのビジネスチェーンにクエリを実行できます。検索に特定のビジネスチェーンを含めたり除外したりできます。この機能を使用すると、エンドユーザーは近所を探索したり、関心のあるポイントを検出したりできます。
SearchNearby API を使用するには、QueryPosition を指定する必要があります。これは次のようになります。
-
デバイスの位置
-
IP ベースの位置
-
マップのビューポート中心
または、ユーザーは都市名または場所を指定でき、アプリケーションはその場所の地理的座標に基づいて結果をバイアスできます。
サポートされているビジネスチェーンの詳細については、「」を参照してくださいBusiness Chains フィルター。
潜在的なユースケース
-
近隣でビジネスを探索する
-
近くの 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"]}'
開発者向けのヒント