View a markdown version of this page

如何取得附近位置的交叉參考 - Amazon Location Service

本文為英文版的機器翻譯版本,如內容有任何歧義或不一致之處,概以英文版為準。

如何取得附近位置的交叉參考

AdditionalFeatures 參數CrossReferences中包含 ,以擷取每個附近位置結果的第三方供應商識別符。

潛在的使用案例

  • 檢閱整合:顯示第三方評分以及附近的搜尋結果。

  • 資料比對:將附近的位置與外部資料庫中的記錄建立關聯。

範例

Sample request
{ "QueryPosition": [-122.3321, 47.6062], "QueryRadius": 1000, "Filter": { "IncludeCategories": ["100-1000-0000"] }, "AdditionalFeatures": ["CrossReferences"] }
Sample response
{ "ResultItems": [ { "PlaceId": "<Redacted>", "PlaceType": "PointOfInterest", "Title": "Pike Place Chowder, Seattle, WA", "CrossReferences": [ { "Source": "Yelp", "SourcePlaceId": "pike-place-chowder-seattle" } ], "Distance": 245 } ] }
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": [-122.3321, 47.6062], "QueryRadius": 1000, "Filter": { "IncludeCategories": ["100-1000-0000"] }, "AdditionalFeatures": ["CrossReferences"] }'
AWS CLI
aws geo-places search-nearby --key ${YourKey} --query-position -122.3321 47.6062 --query-radius 1000 --filter '{"IncludeCategories": ["100-1000-0000"]}' --additional-features CrossReferences

開發人員秘訣