# UseDataLayersOptions

Options for [`useDataLayers`](https://docs.mapcairn.com/api/map/useDataLayers.md).

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

## Signature

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

## Properties

### initial

```ts
readonly initial?: LayersUrlState;
```

Layers and control values from a permalink. Control values are resolved
against each layer's definition, so an invalid one becomes the default.
A layer the catalogue has not got is dropped. A catalogue that is still
loading has no layers yet, so the link's layers wait for its first list
and stay in [`DataLayers`](https://docs.mapcairn.com/api/map/DataLayers.md) meanwhile; one that is not there
when the list arrives is dropped then, and said once, for good. The ids
the link carried past its limit (`initial.dropped`) are said in the same
message.

### now

```ts
readonly now?: () => number;
```

The clock. Defaults to `Date.now`.

## See also

- [`LayersUrlState`](https://docs.mapcairn.com/api/core/LayersUrlState.md)

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