# HeatmapSpec

How a heatmap is drawn. The legend names each step of the ramp with a word
for how dense the points are, so density never rests on colour alone.

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

## Signature

```ts
import type { HeatmapSpec } from "@mapcairn/core";
 
interface HeatmapSpec
```

## Properties

### intensity

```ts
readonly intensity: HeatmapValue;
```

Multiplies each point's weight, 0.1 to 5.

### radius

```ts
readonly radius: HeatmapValue;
```

Pixels each point spreads over, 4 to 80.

### ramp

```ts
readonly ramp: readonly PaletteSlot[];
```

Ordinal colours from the lowest density to the highest. Three to five.

### weightField

```ts
readonly weightField?: string;
```

The field that weights each point (a decoded field, or a tile property). Each counts 1 without it.

### words

```ts
readonly words: readonly DefinitionText[];
```

One word for each step of the ramp, such as `Sparse`, `Moderate`, `Dense`.

## See also

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

Source: [packages/core/src/layers/definition.ts:712](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/layers/definition.ts#L712)
