Skip to main content

DataLayerState

One layer as the ui shows it.

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

Signature​

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

interface DataLayerState

Properties​

controls​

readonly controls: ControlValues;

Every control's value, resolved against the definition.

definition​

readonly definition: LayerDefinition;

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

enabled​

readonly enabled: boolean;

Whether the person has turned the layer on.

features​

readonly features: readonly LayerFeature[];

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

sorted​

readonly sorted: readonly LayerFeature[];

The features in list order.

sortId​

readonly sortId: string;

The id of the list's sort option.

status​

readonly status: LayerStatus;

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

See also​

Source: packages/map/src/layers/useDataLayers.ts:86