# FeedLayerDefinition

A layer of features from a feed: points with a point style (no `kind`),
or polygons or lines with a `shapes` style. Name the style type to narrow
it, such as `FeedLayerDefinition<PointStyle>`.

This is an interface exported by `@mapcairn/core`, checked against version 0.2.0.

## Signature

```ts
import type { FeedLayerDefinition } from "@mapcairn/core";
 
interface FeedLayerDefinition<S extends PointStyle | FeedShapeStyle = PointStyle | FeedShapeStyle> extends LayerDefinitionBase
```

## Type parameters

- `S?` (`PointStyle | FeedShapeStyle`)

## Properties

### card

```ts
readonly card: CardSpec;
```

What a feature's card shows.

### detail

```ts
readonly detail?: DetailSource;
```

A second source fetched on request for one feature, such as its affected area.

### emptyText

```ts
readonly emptyText: DefinitionText;
```

Shown when the feed has no features, such as `No volcano alerts right now`.

### list

```ts
readonly list: ListSpec;
```

How the loaded features are listed.

### source

```ts
readonly source: FeedSource | QuerySource;
```

Where the features come from: a whole feed or a query over the view.

### style

```ts
readonly style: S;
```

How the features are drawn, and so what the legend says.

## See also

- [`LayerDefinitionBase`](https://docs.mapcairn.com/api/core/LayerDefinitionBase.md)
- [`PointStyle`](https://docs.mapcairn.com/api/core/PointStyle.md)
- [`FeedShapeStyle`](https://docs.mapcairn.com/api/core/FeedShapeStyle.md)
- [`CardSpec`](https://docs.mapcairn.com/api/core/CardSpec.md)
- [`DetailSource`](https://docs.mapcairn.com/api/core/DetailSource.md)
- [`DefinitionText`](https://docs.mapcairn.com/api/core/DefinitionText.md)
- [`ListSpec`](https://docs.mapcairn.com/api/core/ListSpec.md)
- [`FeedSource`](https://docs.mapcairn.com/api/core/FeedSource.md)
- [`QuerySource`](https://docs.mapcairn.com/api/core/QuerySource.md)

Source: [packages/core/src/layers/definition.ts:611](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/layers/definition.ts#L611)
