# Adding Feature Information

Feature Information is available via the `featureinfo` package. It allows a user to view the attribute data of a `WMS` or raster `GeoTIFF` layer upon clicking on the layer in the map. Please follow the instructions below for how to add Feature Info to your app.&#x20;

### Adding Feature Information to your App

{% stepper %}
{% step %}

#### Add the `featureinfo` package to your app

In the packages folder, add the `featureinfo` package. If it is not already present in your app, copy it into the packages folder from [this repository](https://github.com/directedproject-eu/directed-pioneer/tree/main/src/packages). Then, add the package to your application's `packages.json` under `dependencies`. For example:&#x20;

```typescript
// your-app/package.json
{
    "name": "my-app",
    "private": true,
    "main": "services.ts",
    "dependencies": {
        "featureinfo": "workspace:^"
    }
}
```

{% endstep %}

{% step %}

#### Install the `featureinfo` package

Run `pnpm install` to install the package.
{% endstep %}

{% step %}

#### Import the package into your app's map

In `MapApp.tsx` (or your main map file), import the package.

```typescript
// your-app/MapApp.tsx
import { FeatureInfo } from "featureinfo";
```

{% endstep %}

{% step %}

#### Add the UI component to your app's map

After the return statement in your `MapApp.tsx`, add the component. This could be, for example, within a `MapAnchor` :

```typescript
// your-app/MapApp.tsx
<MapAnchor position="bottom-left" horizontalGap={15} verticalGap={60}>
    {mapModel && (
        <FeatureInfo
            mapModel={mapModel.map!}
            projection="EPSG:3857"
            layerId={""}
        />
    )}
</MapAnchor>
```

{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://directed-eu.gitbook.io/data-fabric-manual/adding-and-developing-features/adding-feature-information.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
