Skip to content

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).

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]