# 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/sdk/browser`, checked against version 0.2.0.

## Signature

```ts
import type { FeedLayerDefinition } from "@mapcairn/sdk/browser";
 
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.

### saveFeatures

```ts
readonly saveFeatures?: boolean;
```

Whether the person may save the features that are loaded as a GeoJSON or
CSV file. Defaults to false: the provider's terms decide whether its data
may be saved and redistributed, so a definition says so only after they
have been read. Only a feed or query layer of features can be saved, and
`true` on any other kind of layer is a validation problem.

### 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/sdk/browser/LayerDefinitionBase.md)
- [`PointStyle`](https://docs.mapcairn.com/api/sdk/browser/PointStyle.md)
- [`FeedShapeStyle`](https://docs.mapcairn.com/api/sdk/browser/FeedShapeStyle.md)
- [`CardSpec`](https://docs.mapcairn.com/api/sdk/browser/CardSpec.md)
- [`DetailSource`](https://docs.mapcairn.com/api/sdk/browser/DetailSource.md)
- [`DefinitionText`](https://docs.mapcairn.com/api/sdk/browser/DefinitionText.md)
- [`ListSpec`](https://docs.mapcairn.com/api/sdk/browser/ListSpec.md)
- [`FeedSource`](https://docs.mapcairn.com/api/sdk/browser/FeedSource.md)
- [`QuerySource`](https://docs.mapcairn.com/api/sdk/browser/QuerySource.md)
