SearchPlaceIndexForText
Source:
src/AWS/Location/SearchPlaceIndexForText.ts
Geocodes a free-form text query (address, place name, business) into ranked places with coordinates.
Runtime binding for the SearchPlaceIndexForText operation (IAM action
geo:SearchPlaceIndexForText), scoped to one PlaceIndex. Provide the implementation with
Effect.provide(AWS.Location.SearchPlaceIndexForTextHttp).
Searching Places
Section titled “Searching Places”const searchText = yield* Location.SearchPlaceIndexForText(index);
const results = yield* searchText({ Text: "Space Needle, Seattle, WA", MaxResults: 3,});// results.Results[0].Place.Geometry.Point → [longitude, latitude]