# LocationProviderControls

How the location contract scripts a provider. A real adapter implements
these by mocking `navigator.geolocation`.

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

## Signature

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

## Methods

### emitError

```ts
emitError(kind: LocationErrorKind): void;
```

Delivers an error of this kind to the active watch. Used only when `supportsWatch`.

- `kind` (`LocationErrorKind`)

### emitFix

```ts
emitFix(fix: LocationFix): void;
```

Delivers a fix to the active watch. Used only when `supportsWatch`.

- `fix` (`LocationFix`)

### hold

```ts
hold(): void;
```

Keeps the next `locate` pending until its signal aborts.

### willFail

```ts
willFail(kind: LocationErrorKind): void;
```

Makes every later `locate` fail the way `kind` describes.

- `kind` (`LocationErrorKind`)

### willFix

```ts
willFix(fix: LocationFix): void;
```

Makes every later `locate` resolve with this fix.

- `fix` (`LocationFix`)

## See also

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

Source: [packages/core/src/contracts/locationProvider.contract.ts:15](https://github.com/MapCairn/mapcairn/blob/main/packages/core/src/contracts/locationProvider.contract.ts#L15)
