# feedUrl

The URL for a feed or query layer's controls. Missing or invalid values use
their defaults. A query layer needs the `area` of the map it asks for
(see `queryWindow`), which fills its box and its limit.

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

## Signature

```ts
import { feedUrl } from "@mapcairn/core";
 
function feedUrl(definition: LayerDefinition, controls: ControlValues, now: number, area?: Bounds): string;
```

## Parameters

- `definition` (`LayerDefinition`)
- `controls` (`ControlValues`)
- `now` (`number`)
- `area?` (`Bounds`)

## Returns

`string`

## Throws

- when the `area` crosses the antimeridian, which takes two
   requests: use `feedUrls`. It once gave one URL with the box clamped to
   the edge of the world, which asked for the wrong area.

## See also

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

Source: [packages/core/src/layers/feed.ts:177](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/layers/feed.ts#L177)
