翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。
位置のジオコードを取り消す方法
リバースジオコード API を使用すると、位置クエリに基づいてジオコードを地理的領域に変換できます。API レスポンスには、特定の座標に関連付けられた場所に関する情報を提供する場所の詳細が含まれます。
潜在的なユースケース
-
場所情報を保存する: 位置情報を含むデータストアに場所の詳細を追加します。
-
マップの視覚化: 配置情報を使用してマップにデータを表示します。
-
ユーザーの位置検出: デバイスの位置に基づいてユーザーの位置を特定します。
- Sample request
-
{
"QueryPosition": [
-123.11694,
49.28126
]
}
- Sample response
-
{
"ResultItems": [
{
"PlaceId": "<Redacted>",
"PlaceType": "PointAddress",
"Title": "510 W Georgia St, Vancouver, BC V6B 0M3, Canada",
"Address": {
"Label": "510 W Georgia St, Vancouver, BC V6B 0M3, Canada",
"Country": { "Code2": "CA", "Code3": "CAN", "Name": "Canada" },
"Region": { "Code": "BC", "Name": "British Columbia" },
"SubRegion": { "Name": "Metro Vancouver" },
"Locality": "Vancouver",
"District": "Downtown Vancouver",
"PostalCode": "V6B 0M3",
"Street": "W Georgia St",
"StreetComponents": [
{ "BaseName": "Georgia", "Type": "St", "TypePlacement": "AfterBaseName", "TypeSeparator": " ", "Prefix": "W", "Language": "en" }
],
"AddressNumber": "510"
},
"Position": [-123.11694, 49.28126],
"Distance": 0,
"MapView": [-123.11813, 49.27786, -123.11076, 49.28246],
"AccessPoints": [
{ "Position": [-123.11656, 49.28151] }
]
}
]
}
- cURL
-
curl --request POST \
--url 'https://places.geo.eu-central-1.amazonaws.com/v2/reverse-geocode?key=Your_Key' \
--header 'Content-Type: application/json' \
--data '{
"QueryPosition": [
-123.11694,
49.28126
]
}'
- AWS CLI
-
aws geo-places reverse-geocode --key ${YourKey} --query-position "-123.11694,49.28126"
- Sample request
-
{
"QueryPosition": [
-123.11694,
49.28126
],
"MaxResults": "3"
}
- Sample response
-
{
"ResultItems": [
{
"PlaceId": "<Redacted>",
"PlaceType": "PointAddress",
"Title": "510 W Georgia St, Vancouver, BC V6B 0M3, Canada",
"Address": { /* Address details */ },
"Position": [-123.11694, 49.28126],
"Distance": 0,
"MapView": [/* Map view details */],
"AccessPoints": [/* Access point details */]
},
{
"PlaceId": "<Redacted>",
"PlaceType": "PointOfInterest",
"Title": "ChargePoint",
"Address": { /* Address details */ },
"Position": [-123.11663, 49.28116],
"Distance": 25,
"Categories": [/* Category details */],
"AccessPoints": [/* Access point details */]
},
{
"PlaceId": "<Redacted>",
"PlaceType": "PointOfInterest",
"Title": "Zipcar",
"Address": { /* Address details */ },
"Position": [-123.11715, 49.28094],
"Distance": 29,
"Categories": [/* Category details */],
"AccessPoints": [/* Access point details */]
}
]
}
- cURL
-
curl --request POST \
--url 'https://places.geo.eu-central-1.amazonaws.com/v2/reverse-geocode?key=Your_Key' \
--header 'Content-Type: application/json' \
--data '{
"QueryPosition": [
-123.11694,
49.28126
],
"MaxResults": "3"
}'
- AWS CLI
-
aws geo-places reverse-geocode --key ${YourKey} --query-position "-123.11694,49.28126" --max-results "3"
開発者向けのヒント
ターゲットを絞った結果を得るには、フィルターIncludePlaceTypes
で を使用します。
{
"QueryPosition": [
-123.11694,
49.28126
],
"Filter": { "IncludePlaceTypes": ["PointAddress"] }
}