# DataLayerState

One layer as the ui shows it.

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

## Signature

```ts
import type { DataLayerState } from "@mapcairn/map";
 
interface DataLayerState
```

## Properties

### controls

```ts
readonly controls: ControlValues;
```

Every control's value, resolved against the definition.

### definition

```ts
readonly definition: LayerDefinition;
```

The layer as the host defined it: its name, source, style, controls and legend.

### enabled

```ts
readonly enabled: boolean;
```

Whether the person has turned the layer on.

### features

```ts
readonly features: readonly LayerFeature[];
```

The loaded features, in the order the provider sent them.

### sorted

```ts
readonly sorted: readonly LayerFeature[];
```

The features in list order.

### sortId

```ts
readonly sortId: string;
```

The id of the list's sort option.

### status

```ts
readonly status: LayerStatus;
```

What the layer is doing, such as loading, ready or failed (see `LayerStatus`).

## See also

- [`ControlValues`](https://docs.mapcairn.com/api/core/ControlValues.md)
- [`LayerDefinition`](https://docs.mapcairn.com/api/core/LayerDefinition.md)
- [`LayerFeature`](https://docs.mapcairn.com/api/core/LayerFeature.md)
- [`LayerStatus`](https://docs.mapcairn.com/api/map/LayerStatus.md)

Source: [packages/map/src/layers/useDataLayers.ts:86](https://github.com/MapCairn/mapcairn/blob/main/packages/map/src/layers/useDataLayers.ts#L86)
