Skip to content

SearchPlaceIndexForPosition

Source: src/AWS/Location/SearchPlaceIndexForPosition.ts

Reverse-geocodes a coordinate into the nearest addresses and places.

Runtime binding for the SearchPlaceIndexForPosition operation (IAM action geo:SearchPlaceIndexForPosition), scoped to one PlaceIndex. Provide the implementation with Effect.provide(AWS.Location.SearchPlaceIndexForPositionHttp).

const searchPosition = yield* Location.SearchPlaceIndexForPosition(index);
const results = yield* searchPosition({
Position: [-122.3493, 47.6205], // [longitude, latitude]
MaxResults: 1,
});
// results.Results[0].Place.Label → nearest address