Skip to content

ForecastGeofenceEvents

Source: src/AWS/Location/ForecastGeofenceEvents.ts

Forecasts which geofences a device will enter or exit given its position and speed.

Runtime binding for the ForecastGeofenceEvents operation (IAM action geo:ForecastGeofenceEvents), scoped to one GeofenceCollection. Provide the implementation with Effect.provide(AWS.Location.ForecastGeofenceEventsHttp).

const forecast = yield* Location.ForecastGeofenceEvents(collection);
const events = yield* forecast({
DeviceState: { Position: [-122.3493, 47.6205], Speed: 20 },
TimeHorizonMinutes: 30,
});
// events.ForecastedEvents → [{ GeofenceId, EventType, NearestDistance }, …]