# resolveControlValues

A full set of control values from partial, untrusted ones (a permalink, a
change in the ui): values a control accepts are kept, a date outside its
bounds is moved to the nearest bound (a date and time also
rounded down to its step), anything else becomes the default,
and values for controls the layer lacks are dropped.

This is a function exported by `@mapcairn/core`, checked against version 0.2.0.

## Signature

```ts
import { resolveControlValues } from "@mapcairn/core";
 
function resolveControlValues(definition: LayerDefinition, values: Readonly<Record<string, string>> | undefined, now: number): ControlValues;
```

## Parameters

- `definition` (`LayerDefinition`)
- `values` (`Readonly<Record<string, string>> | undefined`)
- `now` (`number`)

## Returns

`ControlValues`

## See also

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

Source: [packages/core/src/layers/controls.ts:148](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/layers/controls.ts#L148)
