Skip to main content

<GeometryInput />

Standalone point / polyline / polygon drawing panel (canvas-based) with a GeoJSON preview. Controlled component:

const [feature, setFeature] = useState<GeoFeature | null>(null);

<GeometryInput value={feature} onChange={setFeature} />;

The resulting GeoFeature can be attached to the next message:

sendMessage("What's in this area?", {
geometry: feature, // GeoJSON Feature drawn by the user
lat: 51.507,
lng: -0.128, // optional viewport centre
});

The backend injects the geometry as spatial context, so the agent can answer "What is this area?" style questions, compute buffers and generate GeoJSON overlays.

GeoJSON types​

Exported for building custom UIs: GeoPoint, GeoPolyline, GeoPolygon, GeoGeometry, GeoFeature, GeoCoordinate - plus MessageAttachment and the AgentState enum for custom rendering of agent steps.