So suchen Sie anhand eines Namens nach einem Ort, POI oder Unternehmen - Amazon Location Service

Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.

So suchen Sie anhand eines Namens nach einem Ort, POI oder Unternehmen

Die SearchText API ermöglicht es Benutzern, mithilfe der freien Texteingabe anhand des Namens nach einem Ort, einem POI oder einem Unternehmen zu suchen. Die Ergebnisse können verfeinert werden, indem eine Schrägposition festgelegt wird, die auf dem Gerätestandort, der IP-Position oder der Mitte des Kartenansichtsfensters basieren kann. Alternativ können Benutzer eine bestimmte Stadt oder einen bestimmten Ort angeben, wobei die Ergebnisse auf der Grundlage der bereitgestellten Geokoordinaten verzerrt sind.

Mögliche Anwendungsfälle

  • Suchen Sie einen Ort anhand des Namens: Rufen Sie Standorte anhand von Ortsnamen ab, z. B. „Gas Town“.

  • Sehenswürdigkeiten finden (POIs): Suchen Sie anhand des Namens nach Sehenswürdigkeiten, z. B. nach „Stanley Park“.

  • Suche nach Unternehmensnamen: Suchen Sie Unternehmen anhand ihres Namens, z. B. nach „Starbucks“.

Beispiele

Sample request
{ "QueryText": "Gas Town", "BiasPosition": [ -123.11336, 49.26038 ] }
Sample response
{ "ResultItems": [ { "PlaceId": "<Redacted>", "PlaceType": "District", "Title": "Gastown, Vancouver, BC, Canada", "Address": { "Label": "Gastown, Vancouver, BC, Canada", "Country": { "Code2": "CA", "Code3": "CAN", "Name": "Canada" }, "Region": { "Code": "BC", "Name": "British Columbia" }, "SubRegion": { "Name": "Metro Vancouver" }, "Locality": "Vancouver", "District": "Gastown", "PostalCode": "V6B" }, "Position": [ -123.10647, 49.28363 ], "Distance": 2633, "MapView": [ -123.11193, 49.28141, -123.10217, 49.28648 ] } ] }
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": "Gas Town", "BiasPosition": [ -123.11336, 49.26038 ] }'
AWS CLI
aws geo-places search-text --key ${YourKey} --query-text "Gas Town" --bias-position -123.11336 49.26038
Sample request
{ "QueryText": "Stanley Park", "BiasPosition": [ -123.11336, 49.26038 ] }
Sample response
{ "ResultItems": [ { "PlaceId": "<Redacted>", "PlaceType": "PointOfInterest", "Title": "Stanley Park", "Address": { "Label": "Stanley Park, Stanley Park Dr, Vancouver, BC V6G, Canada", "Country": { "Code2": "CA", "Code3": "CAN", "Name": "Canada" }, "Region": { "Code": "BC", "Name": "British Columbia" }, "SubRegion": { "Name": "Metro Vancouver" }, "Locality": "Vancouver", "District": "Stanley Park", "PostalCode": "V6G", "Street": "Stanley Park Dr", "StreetComponents": [ { "BaseName": "Stanley Park", "Type": "Dr", "TypePlacement": "AfterBaseName", "TypeSeparator": " ", "Language": "en" } ] }, "Position": [ -123.13593, 49.29716 ], "Distance": 4405, "Categories": [ { "Id": "park-recreation_area", "Name": "Park-Recreation Area", "LocalizedName": "Park-Recreation Area", "Primary": true }, { "Id": "tourist_attraction", "Name": "Tourist Attraction", "LocalizedName": "Tourist Attraction", "Primary": false } ] } ] }
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": "Stanley Park", "BiasPosition": [ -123.11336, 49.26038 ] }'
AWS CLI
aws geo-places search-text --key ${YourKey} --query-text "Stanley Park" --bias-position -123.11336 49.26038
Sample request
{ "QueryText": "Amazon YVR11", "BiasPosition": [ -123.11336, 49.26038 ] }
Sample response
{ "ResultItems": [ { "PlaceId": "<Redacted>", "PlaceType": "PointOfInterest", "Title": "Amazon YVR11", "Address": { "Label": "Amazon YVR11, 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": 2336, "Categories": [ { "Id": "business_facility", "Name": "Business Facility", "LocalizedName": "Business Facility", "Primary": true } ], "AccessPoints": [ { "Position": [ -123.11656, 49.28151 ] } ] } ] }
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": "Amazon YVR11", "BiasPosition": [ -123.11336, 49.26038 ] }'
AWS CLI
aws geo-places search-text --key ${YourKey} --query-text "Amazon YVR11" --bias-position -123.11336 49.26038