# DetailSource

A second source fetched only when someone asks for it on one feature, such
as an event's affected area. Its URL comes from a field of that feature,
so it is checked against `origins` before any request is made.

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

## Signature

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

## Properties

### colour

```ts
readonly colour: PaletteSlot;
```

How the polygons and lines are drawn.

### dataCost

```ts
readonly dataCost: DefinitionText;
```

Roughly how much one request costs, such as `about 300 KB`.

### decoder

```ts
readonly decoder: string;
```

The name of the registered decoder that reads the detail response.

### label

```ts
readonly label: DefinitionText;
```

The button label, such as `Show affected area`.

### origins

```ts
readonly origins: readonly string[];
```

The only `https` origins the URL may have.

### urlField

```ts
readonly urlField: string;
```

The decoded field that holds the URL.

## See also

- [`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:538](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/layers/definition.ts#L538)
